From f3c0050a363e40c02295b95debae9bf57d63b153 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Fri, 19 May 2023 14:33:36 +0700 Subject: [PATCH] upgrade bech32-ibc to 47 --- Makefile | 68 +- config.yml | 14 - go.mod | 116 +- go.sum | 367 +- proto/bech32ibc/v1beta1/genesis.proto | 16 - proto/bech32ibc/v1beta1/gov.proto | 32 - proto/bech32ibc/v1beta1/query.proto | 53 - proto/bech32ibc/v1beta1/types.proto | 26 - scripts/protocgen.sh | 30 +- vue/.browserslistrc | 3 - vue/.env | 1 - vue/.gitignore | 23 - vue/Dockerfile | 12 - vue/README.md | 27 - vue/babel.config.js | 3 - vue/package-lock.json | 13907 ---------------- vue/package.json | 40 - vue/public/favicon.ico | Bin 4286 -> 0 bytes vue/public/index.html | 19 - vue/src/App.vue | 49 - vue/src/components/Sidebar.vue | 35 - vue/src/main.js | 9 - vue/src/router/index.js | 19 - vue/src/scss/app.scss | 1 - vue/src/store/config.js | 12 - .../cosmos-sdk/cosmos.bank.v1beta1/index.d.ts | 2 - .../cosmos-sdk/cosmos.bank.v1beta1/index.js | 314 - .../cosmos-sdk/cosmos.bank.v1beta1/index.ts | 320 - .../cosmos.bank.v1beta1/module/index.d.ts | 22 - .../cosmos.bank.v1beta1/module/index.js | 30 - .../cosmos.bank.v1beta1/module/index.ts | 58 - .../cosmos.bank.v1beta1/module/rest.d.ts | 326 - .../cosmos.bank.v1beta1/module/rest.js | 240 - .../cosmos.bank.v1beta1/module/rest.ts | 561 - .../types/cosmos/bank/v1beta1/bank.d.ts | 121 - .../module/types/cosmos/bank/v1beta1/bank.js | 572 - .../module/types/cosmos/bank/v1beta1/bank.ts | 679 - .../types/cosmos/bank/v1beta1/genesis.d.ts | 44 - .../types/cosmos/bank/v1beta1/genesis.js | 208 - .../types/cosmos/bank/v1beta1/genesis.ts | 251 - .../types/cosmos/bank/v1beta1/query.d.ts | 227 - .../module/types/cosmos/bank/v1beta1/query.js | 884 - .../module/types/cosmos/bank/v1beta1/query.ts | 1226 -- .../module/types/cosmos/bank/v1beta1/tx.d.ts | 70 - .../module/types/cosmos/bank/v1beta1/tx.js | 262 - .../module/types/cosmos/bank/v1beta1/tx.ts | 337 - .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../cosmos-sdk/cosmos.bank.v1beta1/vuex-root | 1 - .../cosmos.base.abci.v1beta1/index.d.ts | 68 - .../cosmos.base.abci.v1beta1/index.js | 94 - .../cosmos.base.abci.v1beta1/index.ts | 110 - .../module/index.d.ts | 18 - .../cosmos.base.abci.v1beta1/module/index.js | 23 - .../cosmos.base.abci.v1beta1/module/index.ts | 52 - .../cosmos.base.abci.v1beta1/module/rest.d.ts | 184 - .../cosmos.base.abci.v1beta1/module/rest.js | 137 - .../cosmos.base.abci.v1beta1/module/rest.ts | 334 - .../types/cosmos/base/abci/v1beta1/abci.d.ts | 202 - .../types/cosmos/base/abci/v1beta1/abci.js | 1085 -- .../types/cosmos/base/abci/v1beta1/abci.ts | 1246 -- .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 109 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 206 - .../module/types/tendermint/abci/types.d.ts | 697 - .../module/types/tendermint/abci/types.js | 4788 ------ .../module/types/tendermint/abci/types.ts | 5624 ------- .../module/types/tendermint/crypto/keys.d.ts | 19 - .../module/types/tendermint/crypto/keys.js | 105 - .../module/types/tendermint/crypto/keys.ts | 130 - .../module/types/tendermint/crypto/proof.d.ts | 73 - .../module/types/tendermint/crypto/proof.js | 456 - .../module/types/tendermint/crypto/proof.ts | 529 - .../module/types/tendermint/types/params.d.ts | 124 - .../module/types/tendermint/types/params.js | 510 - .../module/types/tendermint/types/params.ts | 625 - .../module/types/tendermint/types/types.d.ts | 233 - .../module/types/tendermint/types/types.js | 1689 -- .../module/types/tendermint/types/types.ts | 1912 --- .../types/tendermint/types/validator.d.ts | 44 - .../types/tendermint/types/validator.js | 333 - .../types/tendermint/types/validator.ts | 382 - .../types/tendermint/version/types.d.ts | 39 - .../module/types/tendermint/version/types.js | 165 - .../module/types/tendermint/version/types.ts | 202 - .../cosmos.base.abci.v1beta1/vuex-root | 1 - .../cosmos-sdk/cosmos.base.v1beta1/index.d.ts | 50 - .../cosmos-sdk/cosmos.base.v1beta1/index.js | 82 - .../cosmos-sdk/cosmos.base.v1beta1/index.ts | 98 - .../cosmos.base.v1beta1/module/index.d.ts | 18 - .../cosmos.base.v1beta1/module/index.js | 23 - .../cosmos.base.v1beta1/module/index.ts | 52 - .../cosmos.base.v1beta1/module/rest.d.ts | 71 - .../cosmos.base.v1beta1/module/rest.js | 137 - .../cosmos.base.v1beta1/module/rest.ts | 221 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../cosmos-sdk/cosmos.base.v1beta1/vuex-root | 1 - .../cosmos.crisis.v1beta1/index.d.ts | 2 - .../cosmos-sdk/cosmos.crisis.v1beta1/index.js | 105 - .../cosmos-sdk/cosmos.crisis.v1beta1/index.ts | 116 - .../cosmos.crisis.v1beta1/module/index.d.ts | 20 - .../cosmos.crisis.v1beta1/module/index.js | 27 - .../cosmos.crisis.v1beta1/module/index.ts | 55 - .../cosmos.crisis.v1beta1/module/rest.d.ts | 75 - .../cosmos.crisis.v1beta1/module/rest.js | 137 - .../cosmos.crisis.v1beta1/module/rest.ts | 226 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/crisis/v1beta1/genesis.d.ts | 23 - .../types/cosmos/crisis/v1beta1/genesis.js | 58 - .../types/cosmos/crisis/v1beta1/genesis.ts | 83 - .../types/cosmos/crisis/v1beta1/tx.d.ts | 43 - .../module/types/cosmos/crisis/v1beta1/tx.js | 148 - .../module/types/cosmos/crisis/v1beta1/tx.ts | 217 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../cosmos.crisis.v1beta1/vuex-root | 1 - .../cosmos.distribution.v1beta1/index.d.ts | 2 - .../cosmos.distribution.v1beta1/index.js | 425 - .../cosmos.distribution.v1beta1/index.ts | 423 - .../module/index.d.ts | 26 - .../module/index.js | 36 - .../module/index.ts | 64 - .../module/rest.d.ts | 362 - .../module/rest.js | 268 - .../module/rest.ts | 608 - .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../distribution/v1beta1/distribution.d.ts | 201 - .../distribution/v1beta1/distribution.js | 1075 -- .../distribution/v1beta1/distribution.ts | 1343 -- .../cosmos/distribution/v1beta1/genesis.d.ts | 155 - .../cosmos/distribution/v1beta1/genesis.js | 981 -- .../cosmos/distribution/v1beta1/genesis.ts | 1341 -- .../cosmos/distribution/v1beta1/query.d.ts | 321 - .../cosmos/distribution/v1beta1/query.js | 1259 -- .../cosmos/distribution/v1beta1/query.ts | 1837 -- .../types/cosmos/distribution/v1beta1/tx.d.ts | 141 - .../types/cosmos/distribution/v1beta1/tx.js | 481 - .../types/cosmos/distribution/v1beta1/tx.ts | 728 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../cosmos.distribution.v1beta1/vuex-root | 1 - .../cosmos.evidence.v1beta1/index.d.ts | 2 - .../cosmos.evidence.v1beta1/index.js | 159 - .../cosmos.evidence.v1beta1/index.ts | 169 - .../cosmos.evidence.v1beta1/module/index.d.ts | 20 - .../cosmos.evidence.v1beta1/module/index.js | 27 - .../cosmos.evidence.v1beta1/module/index.ts | 55 - .../cosmos.evidence.v1beta1/module/rest.d.ts | 284 - .../cosmos.evidence.v1beta1/module/rest.js | 169 - .../cosmos.evidence.v1beta1/module/rest.ts | 462 - .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../cosmos/evidence/v1beta1/evidence.d.ts | 24 - .../types/cosmos/evidence/v1beta1/evidence.js | 160 - .../types/cosmos/evidence/v1beta1/evidence.ts | 192 - .../cosmos/evidence/v1beta1/genesis.d.ts | 20 - .../types/cosmos/evidence/v1beta1/genesis.js | 61 - .../types/cosmos/evidence/v1beta1/genesis.ts | 86 - .../types/cosmos/evidence/v1beta1/query.d.ts | 81 - .../types/cosmos/evidence/v1beta1/query.js | 300 - .../types/cosmos/evidence/v1beta1/query.ts | 429 - .../types/cosmos/evidence/v1beta1/tx.d.ts | 51 - .../types/cosmos/evidence/v1beta1/tx.js | 172 - .../types/cosmos/evidence/v1beta1/tx.ts | 248 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/google/protobuf/timestamp.d.ts | 109 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 206 - .../cosmos.evidence.v1beta1/vuex-root | 1 - .../cosmos-sdk/cosmos.gov.v1beta1/index.d.ts | 2 - .../cosmos-sdk/cosmos.gov.v1beta1/index.js | 375 - .../cosmos-sdk/cosmos.gov.v1beta1/index.ts | 377 - .../cosmos.gov.v1beta1/module/index.d.ts | 24 - .../cosmos.gov.v1beta1/module/index.js | 33 - .../cosmos.gov.v1beta1/module/index.ts | 61 - .../cosmos.gov.v1beta1/module/rest.d.ts | 648 - .../cosmos.gov.v1beta1/module/rest.js | 296 - .../cosmos.gov.v1beta1/module/rest.ts | 917 - .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/gov/v1beta1/genesis.d.ts | 32 - .../types/cosmos/gov/v1beta1/genesis.js | 221 - .../types/cosmos/gov/v1beta1/genesis.ts | 271 - .../module/types/cosmos/gov/v1beta1/gov.d.ts | 190 - .../module/types/cosmos/gov/v1beta1/gov.js | 1022 -- .../module/types/cosmos/gov/v1beta1/gov.ts | 1180 -- .../types/cosmos/gov/v1beta1/query.d.ts | 262 - .../module/types/cosmos/gov/v1beta1/query.js | 1188 -- .../module/types/cosmos/gov/v1beta1/query.ts | 1532 -- .../module/types/cosmos/gov/v1beta1/tx.d.ts | 102 - .../module/types/cosmos/gov/v1beta1/tx.js | 450 - .../module/types/cosmos/gov/v1beta1/tx.ts | 562 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 109 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 206 - .../cosmos-sdk/cosmos.gov.v1beta1/vuex-root | 1 - .../cosmos.slashing.v1beta1/index.d.ts | 2 - .../cosmos.slashing.v1beta1/index.js | 187 - .../cosmos.slashing.v1beta1/index.ts | 197 - .../cosmos.slashing.v1beta1/module/index.d.ts | 20 - .../cosmos.slashing.v1beta1/module/index.js | 27 - .../cosmos.slashing.v1beta1/module/index.ts | 55 - .../cosmos.slashing.v1beta1/module/rest.d.ts | 208 - .../cosmos.slashing.v1beta1/module/rest.js | 183 - .../cosmos.slashing.v1beta1/module/rest.ts | 403 - .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../cosmos/slashing/v1beta1/genesis.d.ts | 75 - .../types/cosmos/slashing/v1beta1/genesis.js | 349 - .../types/cosmos/slashing/v1beta1/genesis.ts | 448 - .../types/cosmos/slashing/v1beta1/query.d.ts | 109 - .../types/cosmos/slashing/v1beta1/query.js | 372 - .../types/cosmos/slashing/v1beta1/query.ts | 554 - .../cosmos/slashing/v1beta1/slashing.d.ts | 50 - .../types/cosmos/slashing/v1beta1/slashing.js | 369 - .../types/cosmos/slashing/v1beta1/slashing.ts | 462 - .../types/cosmos/slashing/v1beta1/tx.d.ts | 45 - .../types/cosmos/slashing/v1beta1/tx.js | 97 - .../types/cosmos/slashing/v1beta1/tx.ts | 151 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 109 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 206 - .../cosmos.slashing.v1beta1/vuex-root | 1 - .../cosmos.staking.v1beta1/index.d.ts | 2 - .../cosmos.staking.v1beta1/index.js | 625 - .../cosmos.staking.v1beta1/index.ts | 619 - .../cosmos.staking.v1beta1/module/index.d.ts | 28 - .../cosmos.staking.v1beta1/module/index.js | 39 - .../cosmos.staking.v1beta1/module/index.ts | 67 - .../cosmos.staking.v1beta1/module/rest.d.ts | 857 - .../cosmos.staking.v1beta1/module/rest.js | 362 - .../cosmos.staking.v1beta1/module/rest.ts | 1240 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/staking/v1beta1/genesis.d.ts | 53 - .../types/cosmos/staking/v1beta1/genesis.js | 334 - .../types/cosmos/staking/v1beta1/genesis.ts | 417 - .../types/cosmos/staking/v1beta1/query.d.ts | 493 - .../types/cosmos/staking/v1beta1/query.js | 2122 --- .../types/cosmos/staking/v1beta1/query.ts | 2939 ---- .../types/cosmos/staking/v1beta1/staking.d.ts | 381 - .../types/cosmos/staking/v1beta1/staking.js | 2131 --- .../types/cosmos/staking/v1beta1/staking.ts | 2561 --- .../types/cosmos/staking/v1beta1/tx.d.ts | 182 - .../module/types/cosmos/staking/v1beta1/tx.js | 907 - .../module/types/cosmos/staking/v1beta1/tx.ts | 1187 -- .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 109 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 206 - .../module/types/tendermint/crypto/keys.d.ts | 19 - .../module/types/tendermint/crypto/keys.js | 105 - .../module/types/tendermint/crypto/keys.ts | 130 - .../module/types/tendermint/crypto/proof.d.ts | 73 - .../module/types/tendermint/crypto/proof.js | 456 - .../module/types/tendermint/crypto/proof.ts | 529 - .../module/types/tendermint/types/types.d.ts | 233 - .../module/types/tendermint/types/types.js | 1689 -- .../module/types/tendermint/types/types.ts | 1912 --- .../types/tendermint/types/validator.d.ts | 44 - .../types/tendermint/types/validator.js | 333 - .../types/tendermint/types/validator.ts | 382 - .../types/tendermint/version/types.d.ts | 39 - .../module/types/tendermint/version/types.js | 165 - .../module/types/tendermint/version/types.ts | 202 - .../cosmos.staking.v1beta1/vuex-root | 1 - .../cosmos.vesting.v1beta1/index.d.ts | 2 - .../cosmos.vesting.v1beta1/index.js | 116 - .../cosmos.vesting.v1beta1/index.ts | 126 - .../cosmos.vesting.v1beta1/module/index.d.ts | 20 - .../cosmos.vesting.v1beta1/module/index.js | 27 - .../cosmos.vesting.v1beta1/module/index.ts | 55 - .../cosmos.vesting.v1beta1/module/rest.d.ts | 198 - .../cosmos.vesting.v1beta1/module/rest.js | 137 - .../cosmos.vesting.v1beta1/module/rest.ts | 350 - .../types/cosmos/auth/v1beta1/auth.d.ts | 54 - .../module/types/cosmos/auth/v1beta1/auth.js | 379 - .../module/types/cosmos/auth/v1beta1/auth.ts | 436 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/vesting/v1beta1/tx.d.ts | 52 - .../module/types/cosmos/vesting/v1beta1/tx.js | 219 - .../module/types/cosmos/vesting/v1beta1/tx.ts | 292 - .../types/cosmos/vesting/v1beta1/vesting.d.ts | 85 - .../types/cosmos/vesting/v1beta1/vesting.js | 492 - .../types/cosmos/vesting/v1beta1/vesting.ts | 642 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../cosmos.vesting.v1beta1/vuex-root | 1 - .../ibc.applications.transfer.v1/index.d.ts | 2 - .../ibc.applications.transfer.v1/index.js | 183 - .../ibc.applications.transfer.v1/index.ts | 193 - .../module/index.d.ts | 20 - .../module/index.js | 27 - .../module/index.ts | 55 - .../module/rest.d.ts | 349 - .../module/rest.js | 183 - .../module/rest.ts | 542 - .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../ibc/applications/transfer/v1/genesis.d.ts | 21 - .../ibc/applications/transfer/v1/genesis.js | 100 - .../ibc/applications/transfer/v1/genesis.ts | 125 - .../ibc/applications/transfer/v1/query.d.ts | 112 - .../ibc/applications/transfer/v1/query.js | 365 - .../ibc/applications/transfer/v1/query.ts | 530 - .../applications/transfer/v1/transfer.d.ts | 74 - .../ibc/applications/transfer/v1/transfer.js | 286 - .../ibc/applications/transfer/v1/transfer.ts | 355 - .../ibc/applications/transfer/v1/tx.d.ts | 66 - .../types/ibc/applications/transfer/v1/tx.js | 248 - .../types/ibc/applications/transfer/v1/tx.ts | 314 - .../types/ibc/core/client/v1/client.d.ts | 114 - .../module/types/ibc/core/client/v1/client.js | 500 - .../module/types/ibc/core/client/v1/client.ts | 624 - .../ibc.applications.transfer.v1/vuex-root | 1 - .../cosmos-sdk/ibc.core.channel.v1/index.d.ts | 2 - .../cosmos-sdk/ibc.core.channel.v1/index.js | 694 - .../cosmos-sdk/ibc.core.channel.v1/index.ts | 668 - .../ibc.core.channel.v1/module/index.d.ts | 38 - .../ibc.core.channel.v1/module/index.js | 54 - .../ibc.core.channel.v1/module/index.ts | 82 - .../ibc.core.channel.v1/module/rest.d.ts | 968 -- .../ibc.core.channel.v1/module/rest.js | 365 - .../ibc.core.channel.v1/module/rest.ts | 1317 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/ibc/core/channel/v1/channel.d.ts | 192 - .../types/ibc/core/channel/v1/channel.js | 924 - .../types/ibc/core/channel/v1/channel.ts | 1060 -- .../types/ibc/core/channel/v1/genesis.d.ts | 43 - .../types/ibc/core/channel/v1/genesis.js | 346 - .../types/ibc/core/channel/v1/genesis.ts | 414 - .../types/ibc/core/channel/v1/query.d.ts | 556 - .../module/types/ibc/core/channel/v1/query.js | 2631 --- .../module/types/ibc/core/channel/v1/query.ts | 3475 ---- .../module/types/ibc/core/channel/v1/tx.d.ts | 321 - .../module/types/ibc/core/channel/v1/tx.js | 1810 -- .../module/types/ibc/core/channel/v1/tx.ts | 2275 --- .../types/ibc/core/client/v1/client.d.ts | 114 - .../module/types/ibc/core/client/v1/client.js | 500 - .../module/types/ibc/core/client/v1/client.ts | 624 - .../cosmos-sdk/ibc.core.channel.v1/vuex-root | 1 - .../cosmos-sdk/ibc.core.client.v1/index.d.ts | 2 - .../cosmos-sdk/ibc.core.client.v1/index.js | 345 - .../cosmos-sdk/ibc.core.client.v1/index.ts | 343 - .../ibc.core.client.v1/module/index.d.ts | 26 - .../ibc.core.client.v1/module/index.js | 36 - .../ibc.core.client.v1/module/index.ts | 64 - .../ibc.core.client.v1/module/rest.d.ts | 744 - .../ibc.core.client.v1/module/rest.js | 215 - .../ibc.core.client.v1/module/rest.ts | 971 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/ibc/core/client/v1/client.d.ts | 114 - .../module/types/ibc/core/client/v1/client.js | 500 - .../module/types/ibc/core/client/v1/client.ts | 624 - .../types/ibc/core/client/v1/genesis.d.ts | 58 - .../types/ibc/core/client/v1/genesis.js | 371 - .../types/ibc/core/client/v1/genesis.ts | 472 - .../types/ibc/core/client/v1/query.d.ts | 208 - .../module/types/ibc/core/client/v1/query.js | 861 - .../module/types/ibc/core/client/v1/query.ts | 1201 -- .../module/types/ibc/core/client/v1/tx.d.ts | 149 - .../module/types/ibc/core/client/v1/tx.js | 644 - .../module/types/ibc/core/client/v1/tx.ts | 838 - .../cosmos-sdk/ibc.core.client.v1/vuex-root | 1 - .../ibc.core.connection.v1/index.d.ts | 2 - .../ibc.core.connection.v1/index.js | 319 - .../ibc.core.connection.v1/index.ts | 317 - .../ibc.core.connection.v1/module/index.d.ts | 26 - .../ibc.core.connection.v1/module/index.js | 36 - .../ibc.core.connection.v1/module/index.ts | 64 - .../ibc.core.connection.v1/module/rest.d.ts | 671 - .../ibc.core.connection.v1/module/rest.js | 231 - .../ibc.core.connection.v1/module/rest.ts | 910 - .../module/types/confio/proofs.d.ts | 314 - .../module/types/confio/proofs.js | 1521 -- .../module/types/confio/proofs.ts | 1829 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 - .../module/types/google/api/http.ts | 705 - .../module/types/google/protobuf/any.d.ts | 129 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 237 - .../types/google/protobuf/descriptor.d.ts | 996 -- .../types/google/protobuf/descriptor.js | 4123 ----- .../types/google/protobuf/descriptor.ts | 5216 ------ .../types/ibc/core/client/v1/client.d.ts | 114 - .../module/types/ibc/core/client/v1/client.js | 500 - .../module/types/ibc/core/client/v1/client.ts | 624 - .../ibc/core/commitment/v1/commitment.d.ts | 69 - .../ibc/core/commitment/v1/commitment.js | 246 - .../ibc/core/commitment/v1/commitment.ts | 324 - .../ibc/core/connection/v1/connection.d.ts | 152 - .../ibc/core/connection/v1/connection.js | 679 - .../ibc/core/connection/v1/connection.ts | 798 - .../types/ibc/core/connection/v1/genesis.d.ts | 22 - .../types/ibc/core/connection/v1/genesis.js | 132 - .../types/ibc/core/connection/v1/genesis.ts | 176 - .../types/ibc/core/connection/v1/query.d.ts | 219 - .../types/ibc/core/connection/v1/query.js | 934 -- .../types/ibc/core/connection/v1/query.ts | 1286 -- .../types/ibc/core/connection/v1/tx.d.ts | 172 - .../module/types/ibc/core/connection/v1/tx.js | 1009 -- .../module/types/ibc/core/connection/v1/tx.ts | 1273 -- .../ibc.core.connection.v1/vuex-root | 1 - vue/src/store/generated/index.d.ts | 17 - vue/src/store/generated/index.js | 55 - vue/src/store/generated/index.ts | 60 - vue/src/store/generated/readme.md | 1 - vue/src/store/index.js | 12 - vue/src/views/Index.vue | 19 - vue/src/views/Types.vue | 14 - vue/vue.config.js | 15 - x/bech32ibc/keeper/gov_test.go | 2 +- x/bech32ibc/keeper/keeper.go | 2 +- x/bech32ibc/keeper/query.go | 26 - x/bech32ibc/keeper/records_test.go | 6 +- x/bech32ibc/module.go | 12 +- x/bech32ibc/types/expected_keepers.go | 2 +- x/bech32ibc/types/genesis.pb.go | 55 +- x/bech32ibc/types/gov.pb.go | 89 +- x/bech32ibc/types/query.pb.go | 124 +- x/bech32ibc/types/query.pb.gw.go | 21 +- x/bech32ibc/types/types.pb.go | 77 +- x/bech32ics20/keeper/keeper.go | 2 +- x/bech32ics20/keeper/msg_server.go | 5 +- x/bech32ics20/module.go | 18 +- x/bech32ics20/types/expected_keepers.go | 6 +- 644 files changed, 520 insertions(+), 329116 deletions(-) delete mode 100644 config.yml delete mode 100644 proto/bech32ibc/v1beta1/genesis.proto delete mode 100644 proto/bech32ibc/v1beta1/gov.proto delete mode 100644 proto/bech32ibc/v1beta1/query.proto delete mode 100644 proto/bech32ibc/v1beta1/types.proto delete mode 100644 vue/.browserslistrc delete mode 100644 vue/.env delete mode 100644 vue/.gitignore delete mode 100644 vue/Dockerfile delete mode 100644 vue/README.md delete mode 100644 vue/babel.config.js delete mode 100644 vue/package-lock.json delete mode 100644 vue/package.json delete mode 100644 vue/public/favicon.ico delete mode 100644 vue/public/index.html delete mode 100644 vue/src/App.vue delete mode 100644 vue/src/components/Sidebar.vue delete mode 100644 vue/src/main.js delete mode 100644 vue/src/router/index.js delete mode 100644 vue/src/scss/app.scss delete mode 100644 vue/src/store/config.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/vuex-root delete mode 100644 vue/src/store/generated/index.d.ts delete mode 100644 vue/src/store/generated/index.js delete mode 100644 vue/src/store/generated/index.ts delete mode 100644 vue/src/store/generated/readme.md delete mode 100644 vue/src/store/index.js delete mode 100644 vue/src/views/Index.vue delete mode 100644 vue/src/views/Types.vue delete mode 100644 vue/vue.config.js delete mode 100644 x/bech32ibc/keeper/query.go diff --git a/Makefile b/Makefile index 85ef076..d1a06c7 100644 --- a/Makefile +++ b/Makefile @@ -133,19 +133,59 @@ distclean: clean rm -rf vendor/ ############################################################################### -### Proto ### +### Protobuf ### ############################################################################### -proto-all: proto-format proto-gen +protoVer=0.13.0 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) -proto: - @echo - @echo "=========== Generate Message ============" - @echo - ./scripts/protocgen.sh - @echo - @echo "=========== Generate Complete ============" - @echo +proto-all: proto-format proto-lint proto-gen + +proto-gen: + @echo "Generating Protobuf files" + @$(protoImage) sh ./scripts/protocgen.sh + +proto-swagger-gen: + @echo "Generating Protobuf Swagger" + @$(protoImage) sh ./scripts/protoc-swagger-gen.sh + +proto-format: + @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; + +proto-lint: + @$(protoImage) buf lint --error-format=json + +proto-check-breaking: + @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main + +proto-update-deps: + @echo "Updating Protobuf dependencies" + $(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update + +build-reproducible: go.sum + $(DOCKER) rm latest-build || true + $(DOCKER) run --volume=$(CURDIR)/.././:/sources:ro \ + --env TARGET_PLATFORMS='windows/amd64 darwin/amd64 linux/amd64 linux/arm64 ' \ + --env APP=gravity \ + --env VERSION=$(VERSION) \ + --env COMMIT=$(COMMIT) \ + --env LEDGER_ENABLED=$(LEDGER_ENABLED) \ + --name latest-build altheanet/cosmos-rbuilder:latest + $(DOCKER) cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/ + +clean: + rm -rf $(BUILDDIR)/ artifacts/ + +BUILD_TARGETS := build + +build: BUILD_ARGS=-o $(BUILDDIR)/ + +$(BUILD_TARGETS): go.sum $(BUILDDIR)/ + go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./... + +$(BUILDDIR)/: + mkdir -p $(BUILDDIR)/ build-gaia-docker: docker build -t cosmos/gaia:$(GAIA_VERSION) --build-arg VERSION=$(GAIA_VERSION) -f ./docker/gaiad/Dockerfile . @@ -188,15 +228,7 @@ docs: @echo "=========== Generate Complete ============" @echo -proto-gen: - @echo "Generating Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh -proto-format: - @echo "Formatting Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace \ - --workdir /workspace tendermintdev/docker-build-proto \ - find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; ############################################################################### ### Devdoc ### diff --git a/config.yml b/config.yml deleted file mode 100644 index ebb6b9c..0000000 --- a/config.yml +++ /dev/null @@ -1,14 +0,0 @@ -accounts: - - name: alice - coins: ["1000token", "100000000stake"] - - name: bob - coins: ["500token"] -validator: - name: alice - staked: "100000000stake" -client: - vuex: - path: "vue/src/store" -faucet: - name: bob - coins: ["5token"] diff --git a/go.mod b/go.mod index d44909b..83e492f 100644 --- a/go.mod +++ b/go.mod @@ -1,117 +1,127 @@ module github.com/osmosis-labs/bech32-ibc -go 1.19 +go 1.20 require ( - github.com/cosmos/cosmos-sdk v0.46.11 - github.com/cosmos/ibc-go/v6 v6.1.0 - github.com/gogo/protobuf v1.3.3 - github.com/golang/protobuf v1.5.2 + github.com/cometbft/cometbft v0.37.1 + github.com/cosmos/cosmos-sdk v0.47.2 + github.com/cosmos/gogoproto v1.4.8 + github.com/cosmos/ibc-go/v7 v7.0.0 + github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.6.1 - github.com/tendermint/tendermint v0.34.27 - google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 - google.golang.org/grpc v1.52.0 + google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 + google.golang.org/grpc v1.54.0 + google.golang.org/protobuf v1.30.0 ) require ( + cosmossdk.io/api v0.3.1 // indirect + cosmossdk.io/core v0.5.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/errors v1.0.0-beta.7 // indirect - cosmossdk.io/math v1.0.0-beta.3 // indirect - filippo.io/edwards25519 v1.0.0-rc.1 // indirect + cosmossdk.io/math v1.0.0 // indirect + filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect + github.com/cometbft/cometbft-db v0.7.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-alpha8 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.5 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/golang/glog v1.0.0 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/golang/glog v1.1.0 // indirect + github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-uuid v1.0.1 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.15.11 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.16.3 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.40.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.14.0 // indirect - github.com/stretchr/testify v1.8.1 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/spf13/viper v1.15.0 // indirect + github.com/stretchr/testify v1.8.2 // indirect + github.com/subosito/gotenv v1.4.2 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/tm-db v0.6.7 // indirect - github.com/tidwall/btree v1.5.0 // indirect + github.com/tidwall/btree v1.6.0 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect + go.etcd.io/bbolt v1.3.7 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + pgregory.net/rapid v0.5.5 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) - -replace ( - github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27 -) diff --git a/go.sum b/go.sum index d5ec377..5f16777 100644 --- a/go.sum +++ b/go.sum @@ -17,18 +17,18 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v0.7.0 h1:k4MuwOsS7zGJJ+QfZ5vBK8SgHBAvYN/23BWsiihJ1vs= +cloud.google.com/go/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -39,14 +39,21 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= +cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= -cosmossdk.io/math v1.0.0-beta.3/go.mod h1:3LYasri3Zna4XpbrTNdKsWmD5fHHkaNAod/mNT9XdE4= +cosmossdk.io/math v1.0.0 h1:ro9w7eKx23om2tZz/VM2Pf+z2WAbGX1yDQQOJ6iGeJw= +cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -59,25 +66,23 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= +github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= @@ -88,25 +93,35 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= -github.com/cometbft/cometbft v0.34.27 h1:ri6BvmwjWR0gurYjywcBqRe4bbwc3QVs9KRcCzgh/J0= -github.com/cometbft/cometbft v0.34.27/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw= +github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= +github.com/cometbft/cometbft v0.37.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= +github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= +github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -114,44 +129,52 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= -github.com/cosmos/cosmos-sdk v0.46.11 h1:csMJQHtcb/EIu2EJmeg/2NaGkGw3ZScFwa4CRpCCw18= -github.com/cosmos/cosmos-sdk v0.46.11/go.mod h1:bG4AkW9bqc8ycrryyKGQEl3YV9BY2wr6HggGq8kvcgM= +github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= +github.com/cosmos/cosmos-sdk v0.47.2 h1:9rSriCoiJD+4F+tEDobyM8V7HF5BtY5Ef4VYNig96s0= +github.com/cosmos/cosmos-sdk v0.47.2/go.mod h1:zYzgI8w8hhotXTSoGbbSOAKfpJTx4wOy4XgbaKhtRtc= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= -github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY= -github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v6 v6.1.0 h1:o7oXws2vKkKfOFzJI+oNylRn44PCNt5wzHd/zKQKbvQ= -github.com/cosmos/ibc-go/v6 v6.1.0/go.mod h1:CY3zh2HLfetRiW8LY6kVHMATe90Wj/UOoY8T6cuB0is= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.8 h1:BrHKc6WFZt8+jRV71vKSQE+JrfF+JAnzrKo2VP7wIZ4= +github.com/cosmos/gogoproto v1.4.8/go.mod h1:hnb0DIEWTv+wdNzNcqus5xCQXq5+CXauq1FJuurRfVY= +github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= +github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.0.0 h1:j4kyywlG0hhDmT9FmSaR5iCIka7Pz7kJTxGWY1nlV9Q= +github.com/cosmos/ibc-go/v7 v7.0.0/go.mod h1:BFh8nKWjr5zeR2OZfhkzdgDzj1+KjRn3aJLpwapStj8= +github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= +github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= +github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= +github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= +github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -159,15 +182,20 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -178,22 +206,27 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= +github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -206,6 +239,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -222,8 +256,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -241,10 +276,12 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -259,15 +296,17 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= +github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -285,14 +324,15 @@ github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uM github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= -github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -300,96 +340,101 @@ github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuW github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= -github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= +github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -400,9 +445,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -413,44 +455,33 @@ github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvq github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= +github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= -github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= +github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -464,8 +495,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -478,41 +509,44 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= -github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= -github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= -github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= +github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= +github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -527,8 +561,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -539,8 +573,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -564,6 +598,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -593,18 +628,18 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -614,9 +649,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -627,6 +660,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -649,7 +683,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -661,50 +694,52 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -749,14 +784,17 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -777,7 +815,7 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.102.0 h1:JxJl2qQ85fRMPNvlZY/enexbxpCjLwGhZUtgfGeQ51I= +google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -807,7 +845,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -826,8 +863,9 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 h1:EfLuoKW5WfkgVdDy7dTK8qSbH37AX5mj/MFh+bGPz14= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -845,8 +883,11 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -859,14 +900,16 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -884,6 +927,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -892,6 +937,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/proto/bech32ibc/v1beta1/genesis.proto b/proto/bech32ibc/v1beta1/genesis.proto deleted file mode 100644 index abedc0e..0000000 --- a/proto/bech32ibc/v1beta1/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package bech32ibc.bech32ibc.v1beta1; - -import "gogoproto/gogo.proto"; -import "bech32ibc/v1beta1/types.proto"; - -option go_package = "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"; - -message GenesisState { - string nativeHRP = 1 [ (gogoproto.moretags) = "yaml:\"native_hrp\"" ]; - - repeated HrpIbcRecord hrpIBCRecords = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"hrp_ibc_records\"" - ]; -} \ No newline at end of file diff --git a/proto/bech32ibc/v1beta1/gov.proto b/proto/bech32ibc/v1beta1/gov.proto deleted file mode 100644 index 3b0ead9..0000000 --- a/proto/bech32ibc/v1beta1/gov.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package bech32ibc.bech32ibc.v1beta1; - -import "gogoproto/gogo.proto"; -import "bech32ibc/v1beta1/types.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"; - -// UpdateHrpIBCRecordProposal is a gov Content type for adding a new record -// between a bech32 prefix and an IBC (port, channel). -// It can be used to add a new record to the set. It can also be -// used to update the IBC channel to associate with a specific denom. If channel -// is set to "", it will remove the record from the set. -message UpdateHrpIbcChannelProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - string hrp = 3 [ (gogoproto.moretags) = "yaml:\"hrp\"" ]; - string source_channel = 4 - [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; - uint64 ics_to_height_offset = 5; - google.protobuf.Duration ics_to_time_offset = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "to_time_offset,omitempty", - (gogoproto.moretags) = "yaml:\"to_time_offset\"" - ]; -} \ No newline at end of file diff --git a/proto/bech32ibc/v1beta1/query.proto b/proto/bech32ibc/v1beta1/query.proto deleted file mode 100644 index f25ca91..0000000 --- a/proto/bech32ibc/v1beta1/query.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package bech32ibc.bech32ibc.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; - -import "bech32ibc/v1beta1/types.proto"; - -option go_package = "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"; - -service Query { - // HrpIbcRecords returns to full list of records - rpc HrpIbcRecords(QueryHrpIbcRecordsRequest) - returns (QueryHrpIbcRecordsResponse) { - option (google.api.http).get = "/osmosis/txfees/v1beta1/hrp_ibc_records"; - } - - // HrpIbcRecord returns the record for a requested HRP - rpc HrpIbcRecord(QueryHrpIbcRecordRequest) - returns (QueryHrpIbcRecordResponse) { - option (google.api.http).get = - "/osmosis/txfees/v1beta1/hrp_source_channel/{hrp}"; - } - - // NativeHrp returns the chain's native HRP - rpc NativeHrp(QueryNativeHrpRequest) returns (QueryNativeHrpResponse) { - option (google.api.http).get = "/osmosis/txfees/v1beta1/native_hrp"; - } -} - -message QueryHrpIbcRecordsRequest {} -message QueryHrpIbcRecordsResponse { - repeated HrpIbcRecord hrp_ibc_records = 1 [ - (gogoproto.moretags) = "yaml:\"hrp_ibc_records\"", - (gogoproto.nullable) = false - ]; -} - -message QueryHrpIbcRecordRequest { - string hrp = 1 [ (gogoproto.moretags) = "yaml:\"hrp\"" ]; -} -message QueryHrpIbcRecordResponse { - HrpIbcRecord hrp_ibc_record = 1 [ - (gogoproto.moretags) = "yaml:\"hrp_ibc_record\"", - (gogoproto.nullable) = false - ]; -} - -message QueryNativeHrpRequest {} -message QueryNativeHrpResponse { - string native_hrp = 1 [ (gogoproto.moretags) = "yaml:\"native_hrp\"" ]; -} \ No newline at end of file diff --git a/proto/bech32ibc/v1beta1/types.proto b/proto/bech32ibc/v1beta1/types.proto deleted file mode 100644 index 70d966c..0000000 --- a/proto/bech32ibc/v1beta1/types.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package bech32ibc.bech32ibc.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"; - -// An HrpIbcRecord maps a bech32 human-readable prefix to an IBC source -// channel -message HrpIbcRecord { - option (gogoproto.equal) = true; - - // The bech32 human readable prefix that serves as the key - string hrp = 1 [ (gogoproto.moretags) = "yaml:\"hrp\"" ]; - // the channel by which the packet will be sent - string source_channel = 2 - [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; - uint64 ics_to_height_offset = 3; - google.protobuf.Duration ics_to_time_offset = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "ics_to_time_offset,omitempty", - (gogoproto.moretags) = "yaml:\"ics_to_time_offset\"" - ]; -} \ No newline at end of file diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index c4ac3a5..4a20ec3 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,32 +2,14 @@ set -eo pipefail -# get protoc executions -go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null -# get cosmos sdk from github -go get github.com/cosmos/cosmos-sdk 2>/dev/null +echo "Generating gogo proto code" +cd proto -# Get the path of the cosmos-sdk repo from go/pkg/mod -cosmos_sdk_dir=$(go list -f '{{ .Dir }}' -m github.com/cosmos/cosmos-sdk) -proto_dirs=$(find . -path ./third_party -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -for dir in $proto_dirs; do - # generate protobuf bind - buf protoc \ - -I "proto" \ - -I "$cosmos_sdk_dir/third_party/proto" \ - -I "$cosmos_sdk_dir/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - $(find "${dir}" -name '*.proto') +buf generate --template buf.gen.gogo.yaml $file - # generate grpc gateway - buf protoc \ - -I "proto" \ - -I "$cosmos_sdk_dir/third_party/proto" \ - -I "$cosmos_sdk_dir/proto" \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') -done +cd .. cp -r ./github.com/osmosis-labs/bech32-ibc/* ./ rm -rf ./github.com + +go mod tidy diff --git a/vue/.browserslistrc b/vue/.browserslistrc deleted file mode 100644 index 214388f..0000000 --- a/vue/.browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not dead diff --git a/vue/.env b/vue/.env deleted file mode 100644 index 712cc2d..0000000 --- a/vue/.env +++ /dev/null @@ -1 +0,0 @@ -VUE_APP_ADDRESS_PREFIX=test \ No newline at end of file diff --git a/vue/.gitignore b/vue/.gitignore deleted file mode 100644 index 403adbc..0000000 --- a/vue/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -.DS_Store -node_modules -/dist - - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/vue/Dockerfile b/vue/Dockerfile deleted file mode 100644 index 511980f..0000000 --- a/vue/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# This image is not yet distroless because distroless images expect thatthe entrypoint will be a .js file and ours is vue-cli-service -# We use lopsided/archlinux for comptability - -FROM lopsided/archlinux -COPY . . - -RUN pacman -Syyu --noconfirm npm -RUN npm install -RUN npm run build - -EXPOSE 8080 -CMD ["/usr/bin/npm","run","serve"] \ No newline at end of file diff --git a/vue/README.md b/vue/README.md deleted file mode 100644 index 9bd9c72..0000000 --- a/vue/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# bech32ibc UI - -This is the [vuejs](https://vuejs.org/) user interface to bech32ibc. - -The vue.js framework for building your user interface helps with rapid app development. The framework provides UI components including a login and an HTML-based template. - -## Project setup - -``` -npm install -``` - -### Compiles and hot-reloads for development - -``` -npm run serve -``` - -### Compiles and minifies for production - -``` -npm run build -``` - -### Customize configuration - -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/vue/babel.config.js b/vue/babel.config.js deleted file mode 100644 index c21e479..0000000 --- a/vue/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: ['@vue/cli-plugin-babel/preset'] -} diff --git a/vue/package-lock.json b/vue/package-lock.json deleted file mode 100644 index b382c8a..0000000 --- a/vue/package-lock.json +++ /dev/null @@ -1,13907 +0,0 @@ -{ - "name": "frontend", - "version": "0.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", - "dev": true - }, - "@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - } - }, - "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", - "dev": true, - "requires": { - "@babel/types": "^7.13.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz", - "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz", - "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", - "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", - "semver": "^6.3.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz", - "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-split-export-declaration": "^7.12.13" - } - }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz", - "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.12.13", - "regexpu-core": "^4.7.1" - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz", - "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz", - "integrity": "sha512-qS0peLTDP8kOisG1blKbaoBg/o9OSa1qoumMjTK5pM+KDTtpxpsiubnCGP34vK8BXGcb2M9eigwgvoJryrzwWA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.0" - } - }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", - "dev": true, - "requires": { - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-module-imports": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-module-transforms": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", - "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", - "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", - "dev": true - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz", - "integrity": "sha512-pUQpFBE9JvC9lrQbpX0TmeNIy5s7GnZjna2lhhcHC7DzgBs6fWn722Y5cfwgrtrqc7NAJwMvOa0mKhq6XaE4jg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-wrap-function": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, - "@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.12", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-simple-access": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", - "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", - "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" - }, - "@babel/helper-validator-option": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz", - "integrity": "sha512-1UX9F7K3BS42fI6qd2A4BjKzgGjToscyZTdp1DjknHLCIvpgne6918io+aL5LXFcER/8QWiwpoY902pVEqgTXA==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, - "@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", - "dev": true, - "requires": { - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, - "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/node": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/node/-/node-7.13.13.tgz", - "integrity": "sha512-gElSPunpriXoBGQxDkd5h9L13SVTyzFLTPv9jN1aXJNLR10iNs+MsfhYL/WGJGCJQFddHAdThY7CkmGVz2KPag==", - "dev": true, - "requires": { - "@babel/register": "^7.13.8", - "commander": "^4.0.1", - "core-js": "^3.2.1", - "node-environment-flags": "^1.0.5", - "regenerator-runtime": "^0.13.4", - "v8flags": "^3.1.1" - } - }, - "@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==" - }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz", - "integrity": "sha512-d0u3zWKcoZf379fOeJdr1a5WPDny4aOFZ6hlfKivgK0LY7ZxNfoaHL2fWwdGtHyVvra38FC+HVYkO+byfSA8AQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.13.12" - } - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-remap-async-to-generator": "^7.13.0", - "@babel/plugin-syntax-async-generators": "^7.8.4" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz", - "integrity": "sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-proposal-decorators": { - "version": "7.13.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.13.5.tgz", - "integrity": "sha512-i0GDfVNuoapwiheevUOuSW67mInqJ8qw7uWfpjNVeHMn143kXblEy/bmL9AdZ/0yf/4BMQeWXezK0tQIvNPqag==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-decorators": "^7.12.13" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz", - "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", - "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz", - "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-json-strings": "^7.8.3" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz", - "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", - "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - } - }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", - "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", - "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.8", - "@babel/helper-compilation-targets": "^7.13.8", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.13.0" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz", - "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz", - "integrity": "sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - } - }, - "@babel/plugin-proposal-private-methods": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.13.0.tgz", - "integrity": "sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", - "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-decorators": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.12.13.tgz", - "integrity": "sha512-Rw6aIXGuqDLr6/LoBBYE57nKOzQpz/aDkKlMqEwH+Vp0MXbG6H/TfRjaY343LKxzAKAMXIHsQ8JzaZKuDZ9MwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz", - "integrity": "sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", - "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz", - "integrity": "sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.13.0.tgz", - "integrity": "sha512-3j6E004Dx0K3eGmhxVJxwwI89CTJrce7lg3UrtFuDAVQ/2+SJ/h/aSFOeE6/n0WB1GsOffsJp6MnPQNQ8nmwhg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-remap-async-to-generator": "^7.13.0" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz", - "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz", - "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-split-export-declaration": "^7.12.13", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz", - "integrity": "sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz", - "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz", - "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz", - "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz", - "integrity": "sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz", - "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz", - "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz", - "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.13.8.tgz", - "integrity": "sha512-hwqctPYjhM6cWvVIlOIe27jCIBgHCsdH2xCJVAYQm7V5yTMoilbVMi9f6wKg0rpQAOn6ZG4AOyvCqFF/hUh6+A==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.13.0", - "@babel/helper-module-transforms": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-validator-identifier": "^7.12.11", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz", - "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.13" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz", - "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz", - "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13", - "@babel/helper-replace-supers": "^7.12.13" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", - "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-property-literals": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz", - "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", - "dev": true, - "requires": { - "regenerator-transform": "^0.14.2" - } - }, - "@babel/plugin-transform-reserved-words": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz", - "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", - "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", - "semver": "^6.3.0" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz", - "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz", - "integrity": "sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz", - "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz", - "integrity": "sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz", - "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", - "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz", - "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/preset-env": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.12.tgz", - "integrity": "sha512-JzElc6jk3Ko6zuZgBtjOd01pf9yYDEIH8BcqVuYIuOkzOwDesoa/Nz4gIo4lBG6K861KTV9TvIgmFuT6ytOaAA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-compilation-targets": "^7.13.10", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-validator-option": "^7.12.17", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", - "@babel/plugin-proposal-async-generator-functions": "^7.13.8", - "@babel/plugin-proposal-class-properties": "^7.13.0", - "@babel/plugin-proposal-dynamic-import": "^7.13.8", - "@babel/plugin-proposal-export-namespace-from": "^7.12.13", - "@babel/plugin-proposal-json-strings": "^7.13.8", - "@babel/plugin-proposal-logical-assignment-operators": "^7.13.8", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", - "@babel/plugin-proposal-numeric-separator": "^7.12.13", - "@babel/plugin-proposal-object-rest-spread": "^7.13.8", - "@babel/plugin-proposal-optional-catch-binding": "^7.13.8", - "@babel/plugin-proposal-optional-chaining": "^7.13.12", - "@babel/plugin-proposal-private-methods": "^7.13.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.12.13", - "@babel/plugin-transform-arrow-functions": "^7.13.0", - "@babel/plugin-transform-async-to-generator": "^7.13.0", - "@babel/plugin-transform-block-scoped-functions": "^7.12.13", - "@babel/plugin-transform-block-scoping": "^7.12.13", - "@babel/plugin-transform-classes": "^7.13.0", - "@babel/plugin-transform-computed-properties": "^7.13.0", - "@babel/plugin-transform-destructuring": "^7.13.0", - "@babel/plugin-transform-dotall-regex": "^7.12.13", - "@babel/plugin-transform-duplicate-keys": "^7.12.13", - "@babel/plugin-transform-exponentiation-operator": "^7.12.13", - "@babel/plugin-transform-for-of": "^7.13.0", - "@babel/plugin-transform-function-name": "^7.12.13", - "@babel/plugin-transform-literals": "^7.12.13", - "@babel/plugin-transform-member-expression-literals": "^7.12.13", - "@babel/plugin-transform-modules-amd": "^7.13.0", - "@babel/plugin-transform-modules-commonjs": "^7.13.8", - "@babel/plugin-transform-modules-systemjs": "^7.13.8", - "@babel/plugin-transform-modules-umd": "^7.13.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", - "@babel/plugin-transform-new-target": "^7.12.13", - "@babel/plugin-transform-object-super": "^7.12.13", - "@babel/plugin-transform-parameters": "^7.13.0", - "@babel/plugin-transform-property-literals": "^7.12.13", - "@babel/plugin-transform-regenerator": "^7.12.13", - "@babel/plugin-transform-reserved-words": "^7.12.13", - "@babel/plugin-transform-shorthand-properties": "^7.12.13", - "@babel/plugin-transform-spread": "^7.13.0", - "@babel/plugin-transform-sticky-regex": "^7.12.13", - "@babel/plugin-transform-template-literals": "^7.13.0", - "@babel/plugin-transform-typeof-symbol": "^7.12.13", - "@babel/plugin-transform-unicode-escapes": "^7.12.13", - "@babel/plugin-transform-unicode-regex": "^7.12.13", - "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.13.12", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", - "core-js-compat": "^3.9.0", - "semver": "^6.3.0" - } - }, - "@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - } - }, - "@babel/register": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.13.14.tgz", - "integrity": "sha512-iyw0hUwjh/fzN8qklVqZodbyWjEBOG0KdDnBOpv3zzIgK3NmuRXBmIXH39ZBdspkn8LTHvSboN+oYb4MT43+9Q==", - "dev": true, - "requires": { - "find-cache-dir": "^2.0.0", - "lodash": "^4.17.19", - "make-dir": "^2.1.0", - "pirates": "^4.0.0", - "source-map-support": "^0.5.16" - } - }, - "@babel/runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", - "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", - "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "@confio/ics23": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.3.tgz", - "integrity": "sha512-SQDH9tTzXIbC1AVTrjL7BEXfsYwERXNOB7F995LhfJDrP44cC5sl3Prh+lkfKOjn1jkgxknVUyaGx3tMG88gjQ==", - "requires": { - "protobufjs": "^6.8.8", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11" - } - }, - "@confio/relayer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@confio/relayer/-/relayer-0.1.1.tgz", - "integrity": "sha512-JqckBB5te6gv7fj9gQ9+UUIZcH20D5gKTbIk/CECz1mzgNkXc7oMgkSZ83SWepeOc5WwCsWltvphl0uXQ1G/1g==", - "requires": { - "@cosmjs/crypto": "^0.24.1", - "@cosmjs/encoding": "^0.24.1", - "@cosmjs/faucet-client": "^0.24.1", - "@cosmjs/math": "^0.24.1", - "@cosmjs/proto-signing": "^0.24.1", - "@cosmjs/stargate": "^0.24.1", - "@cosmjs/stream": "^0.24.1", - "@cosmjs/tendermint-rpc": "^0.24.1", - "@cosmjs/utils": "^0.24.1", - "@types/node": "^14.14.25", - "ajv": "^7.1.1", - "axios": "^0.21.1", - "commander": "^7.1.0", - "js-yaml": "^4.0.0", - "protobufjs": "~6.10.2", - "table": "^6.0.7", - "winston": "^3.3.3" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" - } - } - }, - "@cosmjs/crypto": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.24.1.tgz", - "integrity": "sha512-GPhaWmQO06mXldKj/b+oKF5o3jMNfRKpAw+Q8XQhrD7ItinVPDMu8Xgl6frUXWTUdgpYwqpvqOcpm85QUsYV0Q==", - "requires": { - "@cosmjs/encoding": "^0.24.1", - "@cosmjs/math": "^0.24.1", - "@cosmjs/utils": "^0.24.1", - "bip39": "^3.0.2", - "bn.js": "^4.11.8", - "elliptic": "^6.5.3", - "js-sha3": "^0.8.0", - "libsodium-wrappers": "^0.7.6", - "pbkdf2": "^3.1.1", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11", - "unorm": "^1.5.0" - } - }, - "@cosmjs/encoding": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.24.1.tgz", - "integrity": "sha512-PMr+gaXAuM0XgjeXwB1zdX1QI0t+PgVhbmjgI/RSgswDzdExNH97qUopecL0/HG3p64vhIT/6ZjXYYTljZL7WA==", - "requires": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "@cosmjs/faucet-client": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/faucet-client/-/faucet-client-0.24.1.tgz", - "integrity": "sha512-d6AmyunMzqor/lm4M6JzXdHPwpK13szGpk9+VadqGZziXRBeiCVQd2YDGrWwg5N184cSWSZZBX8Hsplt/b8m3w==", - "requires": { - "axios": "^0.21.1" - } - }, - "@cosmjs/json-rpc": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.24.1.tgz", - "integrity": "sha512-kZ6473O81TRMyP1XomnvgIny3nBY//JngnpGJSDZyYjlIm6t5BhLqCuZJiuMOc937RyHKmqUQaOUtDA7X0TKYg==", - "requires": { - "@cosmjs/stream": "^0.24.1", - "xstream": "^11.14.0" - } - }, - "@cosmjs/launchpad": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/launchpad/-/launchpad-0.24.1.tgz", - "integrity": "sha512-syqVGKRH6z1vw4DdAJOSu4OgUXJdkXQozqvDde0cXYwnvhb7EXGSg5CTtp+2GqTBJuNVfMZ2DSvrC2Ig8cWBQQ==", - "requires": { - "@cosmjs/crypto": "^0.24.1", - "@cosmjs/encoding": "^0.24.1", - "@cosmjs/math": "^0.24.1", - "@cosmjs/utils": "^0.24.1", - "axios": "^0.21.1", - "fast-deep-equal": "^3.1.3" - } - }, - "@cosmjs/math": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.24.1.tgz", - "integrity": "sha512-eBQk8twgzmpHFCVkoNjTZhsZwWRbR+JXt0FhjXJoD85SBm4K8b2OnOyTg68uPHVKOJjLRwzyRVYgMrg5TBVgwQ==", - "requires": { - "bn.js": "^4.11.8" - } - }, - "@cosmjs/proto-signing": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.24.1.tgz", - "integrity": "sha512-/rnyNx+FlG6b6O+igsb42eMN1/RXY+pTrNnAE8/YZaRloP9A6MXiTMO5JdYSTcjaD0mEVhejiy96bcyflKYXBg==", - "requires": { - "@cosmjs/launchpad": "^0.24.1", - "long": "^4.0.0", - "protobufjs": "~6.10.2" - } - }, - "@cosmjs/socket": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.24.1.tgz", - "integrity": "sha512-L8zxUzn1C01u5iwLY9u+G8z2WEExU5G7XDRaoVvX22oVBy0wUaxBxmIDsmC/usSd2giYGy1/iVCd5132DwnKbw==", - "requires": { - "@cosmjs/stream": "^0.24.1", - "isomorphic-ws": "^4.0.1", - "ws": "^6.2.0", - "xstream": "^11.14.0" - } - }, - "@cosmjs/stargate": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.24.1.tgz", - "integrity": "sha512-JQnrMML3gHCtP3vtDRz5nzIxZ9UzbFVJzgJSSooHEc3VtOfojxs4XQOeH3w6nrg9jWm6a4VIFWA0lRQQ/9/05g==", - "requires": { - "@confio/ics23": "^0.6.3", - "@cosmjs/encoding": "^0.24.1", - "@cosmjs/launchpad": "^0.24.1", - "@cosmjs/math": "^0.24.1", - "@cosmjs/proto-signing": "^0.24.1", - "@cosmjs/stream": "^0.24.1", - "@cosmjs/tendermint-rpc": "^0.24.1", - "@cosmjs/utils": "^0.24.1", - "long": "^4.0.0", - "protobufjs": "~6.10.2" - } - }, - "@cosmjs/stream": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.24.1.tgz", - "integrity": "sha512-NFoc7kA90vgYRMXzsDnTTTXsH5kCHIhmhEUoQptx5A7LqTjvJScnP1EU+MoT9231L6HVtx0RDIaUulouFGWkcw==", - "requires": { - "xstream": "^11.14.0" - } - }, - "@cosmjs/tendermint-rpc": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.24.1.tgz", - "integrity": "sha512-2s7SmoLjLY9Bq6D4/CkOnwm4WZBSHo6T3oTTKE6NLD+2A8BLcjdDnA49eLe3XzkMtVyfLvfrmoEXkCadfDFPOw==", - "requires": { - "@cosmjs/crypto": "^0.24.1", - "@cosmjs/encoding": "^0.24.1", - "@cosmjs/json-rpc": "^0.24.1", - "@cosmjs/math": "^0.24.1", - "@cosmjs/socket": "^0.24.1", - "@cosmjs/stream": "^0.24.1", - "axios": "^0.21.1", - "readonly-date": "^1.0.0", - "xstream": "^11.14.0" - } - }, - "@cosmjs/utils": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.24.1.tgz", - "integrity": "sha512-VA3WFx1lMFb7esp9BqHWkDgMvHoA3D9w+uDRvWhVRpUpDc7RYHxMbWExASjz+gNblTCg556WJGzF64tXnf9tdQ==" - }, - "@dabh/diagnostics": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", - "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", - "requires": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", - "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", - "dev": true - }, - "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", - "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", - "dev": true - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", - "dev": true - }, - "@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", - "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", - "dev": true, - "requires": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - }, - "@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", - "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", - "dev": true, - "requires": { - "@hapi/hoek": "^8.3.0" - } - }, - "@intervolga/optimize-cssnano-plugin": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@intervolga/optimize-cssnano-plugin/-/optimize-cssnano-plugin-1.0.6.tgz", - "integrity": "sha512-zN69TnSr0viRSU6cEDIcuPcP67QcpQ6uHACg58FiN9PDrU6SLyGW3MR4tiISbYxy1kDWAVPwD+XwQTWE5cigAA==", - "dev": true, - "requires": { - "cssnano": "^4.0.0", - "cssnano-preset-default": "^4.0.0", - "postcss": "^7.0.0" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, - "@soda/friendly-errors-webpack-plugin": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.0.tgz", - "integrity": "sha512-RLotfx6k1+nfLacwNCenj7VnTMPxVwYKoGOcffMFoJDKM8tXzBiCN0hMHFJNnoAojduYAsxuiMm0EOMixgiRow==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "error-stack-parser": "^2.0.2", - "string-width": "^2.0.0", - "strip-ansi": "^5" - } - }, - "@soda/get-current-script": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@soda/get-current-script/-/get-current-script-1.0.2.tgz", - "integrity": "sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==", - "dev": true - }, - "@starport/client-js": { - "version": "0.1.38", - "resolved": "https://registry.npmjs.org/@starport/client-js/-/client-js-0.1.38.tgz", - "integrity": "sha512-RhT7P0JuXP7pAUSW9tF5JGyHyvYZmCdNSfAE8nQV9CWef1F7omv58t+4mapxenhF7p66GSSMNa6JUokC8iHwBA==", - "requires": { - "@cosmjs/stargate": "^0.24.1", - "@types/axios": "^0.14.0", - "@types/reconnectingwebsocket": "^1.0.6", - "axios": "^0.21.1", - "reconnecting-websocket": "^4.4.0" - } - }, - "@starport/vue": { - "version": "0.1.38", - "resolved": "https://registry.npmjs.org/@starport/vue/-/vue-0.1.38.tgz", - "integrity": "sha512-bjkImq77g+KNZf5qOXlu6MwYIATZhQeQbd/TKAKM9TxxxLTi4CKfz+MCfHK3r4SbEvHuQ8/ALFvpZcRAmf1SRw==", - "requires": { - "crypto-js": "^4.0.0", - "dayjs": "^1.10.4", - "file-saver": "^2.0.5", - "gradient-avatar": "^1.0.2", - "js-base64": "^3.6.0", - "vue3-click-away": "^1.1.0" - } - }, - "@starport/vuex": { - "version": "0.1.41", - "resolved": "https://registry.npmjs.org/@starport/vuex/-/vuex-0.1.41.tgz", - "integrity": "sha512-2ZkGIg+OalWY0WM+/0M54whrayBgKFx3Q/2vAvgoPaqgtty8XAXudWNPUyIHT960SeQfIVixfzCh4cyUPrA/tg==", - "requires": { - "@confio/relayer": "^0.1.0", - "@starport/client-js": "^0.1.38", - "axios": "^0.21.1", - "bs58": "^4.0.1", - "crypto-js": "^4.0.0", - "js-sha256": "^0.9.0" - } - }, - "@types/anymatch": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz", - "integrity": "sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==", - "dev": true - }, - "@types/axios": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", - "integrity": "sha1-7CMA++fX3d1+udOr+HmZlkyvzkY=", - "requires": { - "axios": "*" - } - }, - "@types/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==", - "dev": true, - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "@types/connect": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.34.tgz", - "integrity": "sha512-ePPA/JuI+X0vb+gSWlPKOY0NdNAie/rPUqX2GUPpbZwiKTkSPhjXWuee47E4MtE54QVzGCQMQkAL6JhV2E1+cQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/connect-history-api-fallback": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.4.tgz", - "integrity": "sha512-Kf8v0wljR5GSCOCF/VQWdV3ZhKOVA73drXtY3geMTQgHy9dgqQ0dLrf31M0hcuWkhFzK5sP0kkS3mJzcKVtZbw==", - "dev": true, - "requires": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "@types/express": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.11.tgz", - "integrity": "sha512-no+R6rW60JEc59977wIxreQVsIEOAYwgCqldrA/vkpCnbD7MqTefO97lmoBe4WE0F156bC4uLSP1XHDOySnChg==", - "dev": true, - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.19.tgz", - "integrity": "sha512-DJOSHzX7pCiSElWaGR8kCprwibCB/3yW6vcT8VG3P0SJjnv19gnWG/AZMfM60Xj/YJIp/YCaDHyvzsFVeniARA==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/http-proxy": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.5.tgz", - "integrity": "sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", - "dev": true - }, - "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" - }, - "@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", - "dev": true - }, - "@types/minimist": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", - "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", - "dev": true - }, - "@types/node": { - "version": "14.14.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", - "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==" - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, - "@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", - "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", - "dev": true - }, - "@types/qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-0/HnwIfW4ki2D8L8c9GVcG5I72s9jP5GSLVF0VIXDW00kmIpA6O33G7a8n59Tmh7Nz0WUC3rSb7PTY/sdW2JzA==", - "dev": true - }, - "@types/range-parser": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", - "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", - "dev": true - }, - "@types/reconnectingwebsocket": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/reconnectingwebsocket/-/reconnectingwebsocket-1.0.6.tgz", - "integrity": "sha512-5kiyJhOW2T25/fN/tG4CU2AypmhSEf0SRID986X+EIq5h8SBnYP3TjQBRDnltWkm8w35IjfL5gENyRmIoDJh5w==" - }, - "@types/serve-static": { - "version": "1.13.9", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.9.tgz", - "integrity": "sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA==", - "dev": true, - "requires": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "@types/source-list-map": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", - "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", - "dev": true - }, - "@types/tapable": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.7.tgz", - "integrity": "sha512-0VBprVqfgFD7Ehb2vd8Lh9TG3jP98gvr8rgehQqzztZNI7o8zS8Ad4jyZneKELphpuE212D8J70LnSNQSyO6bQ==", - "dev": true - }, - "@types/uglify-js": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.13.0.tgz", - "integrity": "sha512-EGkrJD5Uy+Pg0NUR8uA4bJ5WMfljyad0G+784vLCNUkD+QwOJXUbBYExXfVGf7YtyzdQp3L/XMYcliB987kL5Q==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@types/uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==" - }, - "@types/webpack": { - "version": "4.41.27", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.27.tgz", - "integrity": "sha512-wK/oi5gcHi72VMTbOaQ70VcDxSQ1uX8S2tukBK9ARuGXrYM/+u4ou73roc7trXDNmCxCoerE8zruQqX/wuHszA==", - "dev": true, - "requires": { - "@types/anymatch": "*", - "@types/node": "*", - "@types/tapable": "^1", - "@types/uglify-js": "*", - "@types/webpack-sources": "*", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@types/webpack-dev-server": { - "version": "3.11.3", - "resolved": "https://registry.npmjs.org/@types/webpack-dev-server/-/webpack-dev-server-3.11.3.tgz", - "integrity": "sha512-p9B/QClflreKDeamKhBwuo5zqtI++wwb9QNG/CdIZUFtHvtaq0dWVgbtV7iMl4Sr4vWzEFj0rn16pgUFANjLPA==", - "dev": true, - "requires": { - "@types/connect-history-api-fallback": "*", - "@types/express": "*", - "@types/serve-static": "*", - "@types/webpack": "^4", - "http-proxy-middleware": "^1.0.0" - } - }, - "@types/webpack-sources": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.0.tgz", - "integrity": "sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, - "@vue/babel-helper-vue-jsx-merge-props": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz", - "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==", - "dev": true - }, - "@vue/babel-helper-vue-transform-on": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.0.2.tgz", - "integrity": "sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==", - "dev": true - }, - "@vue/babel-plugin-jsx": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.4.tgz", - "integrity": "sha512-Vu5gsabUdsiWc4vQarg46xWJGs8pMEJyyMQAKA1vO+F4+aR4/jaxWxPCOvZ7XvVyy+ecSbwQp/qIyDVje360UQ==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.0.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "@vue/babel-helper-vue-transform-on": "^1.0.2", - "camelcase": "^6.0.0", - "html-tags": "^3.1.0", - "svg-tags": "^1.0.0" - } - }, - "@vue/babel-plugin-transform-vue-jsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.2.1.tgz", - "integrity": "sha512-HJuqwACYehQwh1fNT8f4kyzqlNMpBuUK4rSiSES5D4QsYncv5fxFsLyrxFPG2ksO7t5WP+Vgix6tt6yKClwPzA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "html-tags": "^2.0.0", - "lodash.kebabcase": "^4.1.1", - "svg-tags": "^1.0.0" - }, - "dependencies": { - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true - } - } - }, - "@vue/babel-preset-app": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-4.5.12.tgz", - "integrity": "sha512-8q67ORQ9O0Ms0nlqsXTVhaBefRBaLrzPxOewAZhdcO7onHwcO5/wRdWtHhZgfpCZlhY7NogkU16z3WnorSSkEA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.0", - "@babel/helper-compilation-targets": "^7.9.6", - "@babel/helper-module-imports": "^7.8.3", - "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-proposal-decorators": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.11.0", - "@babel/preset-env": "^7.11.0", - "@babel/runtime": "^7.11.0", - "@vue/babel-plugin-jsx": "^1.0.3", - "@vue/babel-preset-jsx": "^1.2.4", - "babel-plugin-dynamic-import-node": "^2.3.3", - "core-js": "^3.6.5", - "core-js-compat": "^3.6.5", - "semver": "^6.1.0" - } - }, - "@vue/babel-preset-jsx": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.2.4.tgz", - "integrity": "sha512-oRVnmN2a77bYDJzeGSt92AuHXbkIxbf/XXSE3klINnh9AXBmVS1DGa1f0d+dDYpLfsAKElMnqKTQfKn7obcL4w==", - "dev": true, - "requires": { - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "@vue/babel-sugar-composition-api-inject-h": "^1.2.1", - "@vue/babel-sugar-composition-api-render-instance": "^1.2.4", - "@vue/babel-sugar-functional-vue": "^1.2.2", - "@vue/babel-sugar-inject-h": "^1.2.2", - "@vue/babel-sugar-v-model": "^1.2.3", - "@vue/babel-sugar-v-on": "^1.2.3" - } - }, - "@vue/babel-sugar-composition-api-inject-h": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-composition-api-inject-h/-/babel-sugar-composition-api-inject-h-1.2.1.tgz", - "integrity": "sha512-4B3L5Z2G+7s+9Bwbf+zPIifkFNcKth7fQwekVbnOA3cr3Pq71q71goWr97sk4/yyzH8phfe5ODVzEjX7HU7ItQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-composition-api-render-instance": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-composition-api-render-instance/-/babel-sugar-composition-api-render-instance-1.2.4.tgz", - "integrity": "sha512-joha4PZznQMsxQYXtR3MnTgCASC9u3zt9KfBxIeuI5g2gscpTsSKRDzWQt4aqNIpx6cv8On7/m6zmmovlNsG7Q==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-functional-vue": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.2.2.tgz", - "integrity": "sha512-JvbgGn1bjCLByIAU1VOoepHQ1vFsroSA/QkzdiSs657V79q6OwEWLCQtQnEXD/rLTA8rRit4rMOhFpbjRFm82w==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-inject-h": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.2.2.tgz", - "integrity": "sha512-y8vTo00oRkzQTgufeotjCLPAvlhnpSkcHFEp60+LJUwygGcd5Chrpn5480AQp/thrxVm8m2ifAk0LyFel9oCnw==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-v-model": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.2.3.tgz", - "integrity": "sha512-A2jxx87mySr/ulAsSSyYE8un6SIH0NWHiLaCWpodPCVOlQVODCaSpiR4+IMsmBr73haG+oeCuSvMOM+ttWUqRQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "camelcase": "^5.0.0", - "html-tags": "^2.0.0", - "svg-tags": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true - } - } - }, - "@vue/babel-sugar-v-on": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.2.3.tgz", - "integrity": "sha512-kt12VJdz/37D3N3eglBywV8GStKNUhNrsxChXIV+o0MwVXORYuhDTHJRKPgLJRb/EY3vM2aRFQdxJBp9CLikjw==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "camelcase": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "@vue/cli-overlay": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.12.tgz", - "integrity": "sha512-dCN0RzVpA8fp+MfjuVBROgM483MPObAb/je+APE/JhpCJyPQORYQEvNpmaorpN+9Cp6mrESVSzhh0qD4SFrlzg==", - "dev": true - }, - "@vue/cli-plugin-babel": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-4.5.12.tgz", - "integrity": "sha512-PhiNDhlGydsRR0F00OJqG/Q3Mz2G1ko8XqS7CJ0l1GVVGmklUEBy2dW/S8ntEgHpSkFa6h49PgYP3WE2OM3CEg==", - "dev": true, - "requires": { - "@babel/core": "^7.11.0", - "@vue/babel-preset-app": "^4.5.12", - "@vue/cli-shared-utils": "^4.5.12", - "babel-loader": "^8.1.0", - "cache-loader": "^4.1.0", - "thread-loader": "^2.1.3", - "webpack": "^4.0.0" - } - }, - "@vue/cli-plugin-router": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.12.tgz", - "integrity": "sha512-DYNz5AA3W7Ewt3aaiOLGdYFt4MX4w/HTEtep+kPzP9S9tAknzyoIJXkaYzhwu8ArpEYwhWgtuCcDZ8hR6++DbA==", - "dev": true, - "requires": { - "@vue/cli-shared-utils": "^4.5.12" - } - }, - "@vue/cli-plugin-vuex": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.12.tgz", - "integrity": "sha512-STgbvNv/3iHAKArc18b/qjN7RX1FTrfxPeHH26GOr/A8lJes7+CSluZZ8E5R7Zr/vL0zOqOkUVDAjFXVf4zWQA==", - "dev": true - }, - "@vue/cli-service": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.12.tgz", - "integrity": "sha512-Di/dFw72HIvUrpTgnnPQkPq07mdd7z3GPeCH/o+6fv4bxOD+gwK9z7P6RkG4lGv2QdLz+qjim9f7xw5w+9ENkg==", - "dev": true, - "requires": { - "@intervolga/optimize-cssnano-plugin": "^1.0.5", - "@soda/friendly-errors-webpack-plugin": "^1.7.1", - "@soda/get-current-script": "^1.0.0", - "@types/minimist": "^1.2.0", - "@types/webpack": "^4.0.0", - "@types/webpack-dev-server": "^3.11.0", - "@vue/cli-overlay": "^4.5.12", - "@vue/cli-plugin-router": "^4.5.12", - "@vue/cli-plugin-vuex": "^4.5.12", - "@vue/cli-shared-utils": "^4.5.12", - "@vue/component-compiler-utils": "^3.1.2", - "@vue/preload-webpack-plugin": "^1.1.0", - "@vue/web-component-wrapper": "^1.2.0", - "acorn": "^7.4.0", - "acorn-walk": "^7.1.1", - "address": "^1.1.2", - "autoprefixer": "^9.8.6", - "browserslist": "^4.12.0", - "cache-loader": "^4.1.0", - "case-sensitive-paths-webpack-plugin": "^2.3.0", - "cli-highlight": "^2.1.4", - "clipboardy": "^2.3.0", - "cliui": "^6.0.0", - "copy-webpack-plugin": "^5.1.1", - "css-loader": "^3.5.3", - "cssnano": "^4.1.10", - "debug": "^4.1.1", - "default-gateway": "^5.0.5", - "dotenv": "^8.2.0", - "dotenv-expand": "^5.1.0", - "file-loader": "^4.2.0", - "fs-extra": "^7.0.1", - "globby": "^9.2.0", - "hash-sum": "^2.0.0", - "html-webpack-plugin": "^3.2.0", - "launch-editor-middleware": "^2.2.1", - "lodash.defaultsdeep": "^4.6.1", - "lodash.mapvalues": "^4.6.0", - "lodash.transform": "^4.6.0", - "mini-css-extract-plugin": "^0.9.0", - "minimist": "^1.2.5", - "pnp-webpack-plugin": "^1.6.4", - "portfinder": "^1.0.26", - "postcss-loader": "^3.0.0", - "ssri": "^7.1.0", - "terser-webpack-plugin": "^2.3.6", - "thread-loader": "^2.1.3", - "url-loader": "^2.2.0", - "vue-loader": "^15.9.2", - "vue-loader-v16": "npm:vue-loader@^16.1.0", - "vue-style-loader": "^4.1.2", - "webpack": "^4.0.0", - "webpack-bundle-analyzer": "^3.8.0", - "webpack-chain": "^6.4.0", - "webpack-dev-server": "^3.11.0", - "webpack-merge": "^4.2.2" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.2.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz", - "integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - } - } - } - }, - "@vue/cli-shared-utils": { - "version": "4.5.12", - "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.12.tgz", - "integrity": "sha512-qnIQPJ4XckMoqYh9fJ0Y91QKMIb4Hiibrm9+k4E15QHpk5RaokuOpf10SsOr2NLPCXSWsHOLo3hduZSwHPGY/Q==", - "dev": true, - "requires": { - "@hapi/joi": "^15.0.1", - "chalk": "^2.4.2", - "execa": "^1.0.0", - "launch-editor": "^2.2.1", - "lru-cache": "^5.1.1", - "node-ipc": "^9.1.1", - "open": "^6.3.0", - "ora": "^3.4.0", - "read-pkg": "^5.1.1", - "request": "^2.88.2", - "semver": "^6.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "@vue/compiler-core": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.10.tgz", - "integrity": "sha512-rayD+aODgX9CWgWv0cAI+whPLyMmtkWfNGsZpdpsaIloh8mY2hX8+SvE1Nn3755YhGWJ/7oaDEcNpOctGwZbsA==", - "requires": { - "@babel/parser": "^7.12.0", - "@babel/types": "^7.12.0", - "@vue/shared": "3.0.10", - "estree-walker": "^2.0.1", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "@vue/compiler-dom": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.10.tgz", - "integrity": "sha512-SzN1li9xAxtqkZimR1AFU2t1N0vzsAJxR/5764xoS0xedwhUU9s8s+Tks2FNMLsXiqdkP2Qd4zAM+9EwTbZmRw==", - "requires": { - "@vue/compiler-core": "3.0.10", - "@vue/shared": "3.0.10" - } - }, - "@vue/compiler-sfc": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.10.tgz", - "integrity": "sha512-LLbXHwKMM72aomKsj9AySkLP1xIHREh/3w0nueenKhsWuaKTL1/XUhIPml23+Z+tX55qeJiUIHDeJuFSxfgQfg==", - "dev": true, - "requires": { - "@babel/parser": "^7.13.9", - "@babel/types": "^7.13.0", - "@vue/compiler-core": "3.0.10", - "@vue/compiler-dom": "3.0.10", - "@vue/compiler-ssr": "3.0.10", - "@vue/shared": "3.0.10", - "consolidate": "^0.16.0", - "estree-walker": "^2.0.1", - "hash-sum": "^2.0.0", - "lru-cache": "^5.1.1", - "magic-string": "^0.25.7", - "merge-source-map": "^1.1.0", - "postcss": "^8.1.10", - "postcss-modules": "^4.0.0", - "postcss-selector-parser": "^6.0.4", - "source-map": "^0.6.1" - }, - "dependencies": { - "postcss": { - "version": "8.2.9", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.9.tgz", - "integrity": "sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==", - "dev": true, - "requires": { - "colorette": "^1.2.2", - "nanoid": "^3.1.22", - "source-map": "^0.6.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@vue/compiler-ssr": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.10.tgz", - "integrity": "sha512-skrPSp9pjZG3unqHpUaEaRRpO1yYxbCXRfJ1kZW8PTGAg5g3Y/hrUet5+Q6zCIZwr5j1mSMBSLXMDCjFuyyZLg==", - "dev": true, - "requires": { - "@vue/compiler-dom": "3.0.10", - "@vue/shared": "3.0.10" - } - }, - "@vue/component-compiler-utils": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.0.tgz", - "integrity": "sha512-lejBLa7xAMsfiZfNp7Kv51zOzifnb29FwdnMLa96z26kXErPFioSf9BMcePVIQ6/Gc6/mC0UrPpxAWIHyae0vw==", - "dev": true, - "requires": { - "consolidate": "^0.15.1", - "hash-sum": "^1.0.2", - "lru-cache": "^4.1.2", - "merge-source-map": "^1.1.0", - "postcss": "^7.0.14", - "postcss-selector-parser": "^6.0.2", - "prettier": "^1.18.2", - "source-map": "~0.6.1", - "vue-template-es2015-compiler": "^1.9.0" - }, - "dependencies": { - "consolidate": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", - "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", - "dev": true, - "requires": { - "bluebird": "^3.1.1" - } - }, - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true, - "optional": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "@vue/preload-webpack-plugin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz", - "integrity": "sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ==", - "dev": true - }, - "@vue/reactivity": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.10.tgz", - "integrity": "sha512-0GOSqlIv/a5wy4r6fAcdaglQ8v2sLYMRUpu49yK8Z2vHccK85Ym3R9C9K3vo6dfBRGbbCVvoKxYtQw49LvE8Ug==", - "requires": { - "@vue/shared": "3.0.10" - } - }, - "@vue/runtime-core": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.10.tgz", - "integrity": "sha512-qKhCOwHGff5YEdyClO1gf9Q9xgaPPz/qJ2GyzNZkPb00WcXJ3l+yTgHZWaSywRLs9GD1y9Ff3C0MIowzj95NHA==", - "requires": { - "@vue/reactivity": "3.0.10", - "@vue/shared": "3.0.10" - } - }, - "@vue/runtime-dom": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.10.tgz", - "integrity": "sha512-8yRAALc/884UlYWY7hJImecvow1Cngbl2B6n0ThYTms08FVQ3W9tdW0MEvR3JVit06JyQLS1Qvwdn1PwNPPDqg==", - "requires": { - "@vue/runtime-core": "3.0.10", - "@vue/shared": "3.0.10", - "csstype": "^2.6.8" - } - }, - "@vue/shared": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.10.tgz", - "integrity": "sha512-p8GJ+bGpEGiEHICwcCH/EtJnkZQllrOfm1J2J+Ep0ydMte25bPnArgrY/h2Tn1LKqqR3LXyQlOSYY6gJgiW2LQ==" - }, - "@vue/web-component-wrapper": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz", - "integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", - "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", - "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", - "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", - "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", - "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", - "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", - "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", - "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", - "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", - "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", - "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", - "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", - "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/helper-wasm-section": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-opt": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", - "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", - "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", - "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", - "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/floating-point-hex-parser": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-code-frame": "1.9.0", - "@webassemblyjs/helper-fsm": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", - "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true - }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", - "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", - "dev": true - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "dependencies": { - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - } - } - }, - "ajv": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", - "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "optional": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "9.8.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", - "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", - "dev": true, - "requires": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "colorette": "^1.2.1", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "babel-loader": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", - "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", - "dev": true, - "requires": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^1.4.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "dependencies": { - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } - } - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-polyfill-corejs2": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.10.tgz", - "integrity": "sha512-DO95wD4g0A8KRaHKi0D51NdGXzvpqVLnLu5BTvDlpqUEpTmeEtypgC1xqesORaWmiUOQI14UHKlzNd9iZ2G3ZA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.0", - "@babel/helper-define-polyfill-provider": "^0.1.5", - "semver": "^6.1.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.7.tgz", - "integrity": "sha512-u+gbS9bbPhZWEeyy1oR/YaaSpod/KDT07arZHb80aTpl8H5ZBq+uN1nN9/xtX7jQyfLdPfoqI4Rue/MQSWJquw==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5", - "core-js-compat": "^3.8.1" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.6.tgz", - "integrity": "sha512-OUrYG9iKPKz8NxswXbRAdSwF0GhRdIEMTloQATJi4bDuFqrXaXcCUT/VGNrr8pBcjMh1RxZ7Xt9cytVJTJfvMg==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" - }, - "bfj": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.2.tgz", - "integrity": "sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "check-types": "^8.0.3", - "hoopy": "^0.1.4", - "tryer": "^1.0.1" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "optional": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip39": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.3.tgz", - "integrity": "sha512-P0dKrz4g0V0BjXfx7d9QNkJ/Txcz/k+hM9TnjqjUaXtuOfAvxXSw2rJw8DX0e3ZPwnK/IgDxoRqf0bvoVCqbMg==", - "requires": { - "@types/node": "11.11.6", - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1" - }, - "dependencies": { - "@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" - } - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - }, - "dependencies": { - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - } - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - } - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", - "escalade": "^3.1.1", - "node-releases": "^1.1.70" - } - }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", - "requires": { - "base-x": "^3.0.2" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-json": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/buffer-json/-/buffer-json-2.0.0.tgz", - "integrity": "sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", - "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cache-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-4.1.0.tgz", - "integrity": "sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw==", - "dev": true, - "requires": { - "buffer-json": "^2.0.0", - "find-cache-dir": "^3.0.0", - "loader-utils": "^1.2.3", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.1", - "schema-utils": "^2.0.0" - }, - "dependencies": { - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001204", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", - "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", - "dev": true - }, - "case-sensitive-paths-webpack-plugin": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz", - "integrity": "sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "check-types": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/check-types/-/check-types-8.0.3.tgz", - "integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==", - "dev": true - }, - "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "dev": true, - "optional": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "optional": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "optional": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "optional": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "optional": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "optional": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-highlight": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", - "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "cli-spinners": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", - "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", - "dev": true - }, - "clipboardy": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz", - "integrity": "sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ==", - "dev": true, - "requires": { - "arch": "^2.1.1", - "execa": "^1.0.0", - "is-wsl": "^2.1.1" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz", - "integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.4" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "color-string": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", - "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" - }, - "colorspace": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", - "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", - "requires": { - "color": "3.0.x", - "text-hex": "1.0.x" - }, - "dependencies": { - "color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - } - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "requires": { - "mime-db": ">= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true - }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "consolidate": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.16.0.tgz", - "integrity": "sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ==", - "dev": true, - "requires": { - "bluebird": "^3.7.2" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz", - "integrity": "sha512-Uh7crJAco3AjBvgAy9Z75CjK8IG+gxaErro71THQ+vv/bl4HaQcpkexAY8KVW/T6D2W2IRr+couF/knIRkZMIQ==", - "dev": true, - "requires": { - "cacache": "^12.0.3", - "find-cache-dir": "^2.1.0", - "glob-parent": "^3.1.0", - "globby": "^7.1.1", - "is-glob": "^4.0.1", - "loader-utils": "^1.2.3", - "minimatch": "^3.0.4", - "normalize-path": "^3.0.0", - "p-limit": "^2.2.1", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - } - } - }, - "core-js": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.10.0.tgz", - "integrity": "sha512-MQx/7TLgmmDVamSyfE+O+5BHvG1aUGj/gHhLn1wVtm2B5u1eVIPvh7vkfjwWKNCjrTJB8+He99IntSQ1qP+vYQ==" - }, - "core-js-compat": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.9.1.tgz", - "integrity": "sha512-jXAirMQxrkbiiLsCx9bQPJFA6llDadKMpYrBJQJ3/c4/vsPP/fAf29h24tviRlvwUL6AmY5CHLu2GvjuYviQqA==", - "dev": true, - "requires": { - "browserslist": "^4.16.3", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - } - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "crypto-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", - "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-loader": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.6.0.tgz", - "integrity": "sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "cssesc": "^3.0.0", - "icss-utils": "^4.1.1", - "loader-utils": "^1.2.3", - "normalize-path": "^3.0.0", - "postcss": "^7.0.32", - "postcss-modules-extract-imports": "^2.0.0", - "postcss-modules-local-by-default": "^3.0.2", - "postcss-modules-scope": "^2.2.0", - "postcss-modules-values": "^3.0.0", - "postcss-value-parser": "^4.1.0", - "schema-utils": "^2.7.0", - "semver": "^6.3.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "css-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", - "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", - "dev": true - }, - "css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", - "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", - "dev": true, - "requires": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "css-what": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", - "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", - "dev": true - }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true - }, - "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", - "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", - "dev": true - }, - "csso": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", - "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", - "dev": true, - "requires": { - "css-tree": "^1.1.2" - }, - "dependencies": { - "css-tree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", - "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", - "dev": true, - "requires": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - } - }, - "mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "csstype": { - "version": "2.6.16", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", - "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "dayjs": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", - "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==" - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "deepmerge": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", - "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", - "dev": true - }, - "default-gateway": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-5.0.5.tgz", - "integrity": "sha512-z2RnruVmj8hVMmAnEJMTIJNijhKCDiGjbLP+BHJFOT7ld3Bo5qcIBpVYDniqhbMIIf+jZDlkP2MkPXiQy/DBLA==", - "dev": true, - "requires": { - "execa": "^3.3.0" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", - "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "del": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", - "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-node": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz", - "integrity": "sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", - "dev": true, - "requires": { - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", - "dev": true - }, - "dotenv-expand": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", - "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", - "dev": true - }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "easy-stack": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.1.tgz", - "integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w==", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", - "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.702", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.702.tgz", - "integrity": "sha512-qJVUKFWQnF6wP7MmTngDkmm8/KPzaiTXNFOAg5j7DSa6J7kPou7mTBqC8jpUOxauQWwHR3pn4dMRdV8IE1xdtA==", - "dev": true - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, - "enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", - "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true - }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "error-stack-parser": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", - "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", - "dev": true, - "requires": { - "stackframe": "^1.1.1" - } - }, - "es-abstract": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", - "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.2", - "is-string": "^1.0.5", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.0" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-pubsub": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/event-pubsub/-/event-pubsub-4.3.0.tgz", - "integrity": "sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==", - "dev": true - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "eventsource": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", - "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - }, - "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", - "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "fecha": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", - "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==" - }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", - "dev": true - }, - "file-loader": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-4.3.0.tgz", - "integrity": "sha512-aKrYPYjF1yG3oX0kWRrqrSMfgftm7oJW5M+m4owoldH5C51C0RkIwB++JbRvEW3IU6/ZG5n8UvEcdgwOt2UOWA==", - "dev": true, - "requires": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.5.0" - } - }, - "file-saver": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", - "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, - "follow-redirects": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", - "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, - "generic-names": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-2.0.1.tgz", - "integrity": "sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0" - } - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "globalthis": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.2.tgz", - "integrity": "sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==", - "requires": { - "define-properties": "^1.1.3" - } - }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - } - }, - "globule": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", - "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true - }, - "gradient-avatar": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/gradient-avatar/-/gradient-avatar-1.0.2.tgz", - "integrity": "sha512-Od9KI2YImV60wnsvU/u6GEyBm2fiHUUHgiLySE243GYl/T/tiJMJ5QYey8o7tepugmlnUGQRaCItHv19UnUjUg==", - "requires": { - "hsl-rgb": "^1.0.0", - "hsl-triad": "^1.0.0", - "string-hash": "^1.1.3" - } - }, - "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - } - }, - "handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", - "dev": true - }, - "highlight.js": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.1.tgz", - "integrity": "sha512-S6G97tHGqJ/U8DsXcEdnACbirtbx58Bx9CzIVeYli8OuswCfYI/LsXH2EiGcoGio1KAC3x4mmUwulOllJ2ZyRA==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", - "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsl-rgb": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-rgb/-/hsl-rgb-1.0.0.tgz", - "integrity": "sha512-cNq+7sfwzSDoiG/jiu8wZpOmjScUZrMKiI33tH3aQ1MZsXWQd0yJjMpPwu2OZFYa4D/bOT1aCbB5gS1kOqFx1A==" - }, - "hsl-triad": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-triad/-/hsl-triad-1.0.0.tgz", - "integrity": "sha512-PKnjrMugS6sHC5dVh4VQZYOHEKG2QILjVwbpEtNjEV19RyswuIxrIiGhumVJjya/FjK/p9gX6+zRMXFGTvaQAA==" - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", - "dev": true - }, - "html-entities": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", - "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", - "dev": true - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", - "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - } - } - }, - "html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", - "dev": true - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "http-parser-js": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", - "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", - "dev": true - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.1.0.tgz", - "integrity": "sha512-OnjU5vyVgcZVe2AjLJyMrk8YLNOC2lspCHirB5ldM+B/dwEfZ5bgVTrFyzE9R7xRWAP/i/FXtvIqKjTNEZBhBg==", - "dev": true, - "requires": { - "@types/http-proxy": "^1.17.5", - "camelcase": "^6.2.0", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", - "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", - "dev": true, - "requires": { - "postcss": "^7.0.14" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", - "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", - "dev": true, - "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - }, - "dependencies": { - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", - "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - } - } - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "requires": { - "call-bind": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "dev": true - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", - "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", - "dev": true - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true - }, - "is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", - "dev": true, - "requires": { - "is-path-inside": "^2.1.0" - } - }, - "is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", - "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", - "dev": true, - "requires": { - "path-is-inside": "^1.0.2" - } - }, - "is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isomorphic-ws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "javascript-stringify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.0.1.tgz", - "integrity": "sha512-yV+gqbd5vaOYjqlbk16EG89xB5udgjqQF3C5FAORDg4f/IS1Yc5ERCv5e/57yBcfJYw05V5JyIXabhwb75Xxow==", - "dev": true - }, - "jest-worker": { - "version": "25.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.5.0.tgz", - "integrity": "sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==", - "dev": true, - "requires": { - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-base64": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.6.0.tgz", - "integrity": "sha512-wVdUBYQeY2gY73RIlPrysvpYx+2vheGo8Y1SNQv/BzHToWpAZzJU7Z6uheKMAe+GLSBig5/Ps2nxg/8tRB73xg==" - }, - "js-message": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.7.tgz", - "integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==", - "dev": true - }, - "js-queue": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.2.tgz", - "integrity": "sha512-pbKLsbCfi7kriM3s1J4DDCo7jQkI58zPLHi0heXPzPlj0hjUsm+FesPUbE0DSbIVIK503A36aUBoCN7eMFedkA==", - "dev": true, - "requires": { - "easy-stack": "^1.0.1" - } - }, - "js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", - "requires": { - "argparse": "^2.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", - "dev": true - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klona": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", - "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", - "dev": true - }, - "kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, - "launch-editor": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.2.1.tgz", - "integrity": "sha512-On+V7K2uZK6wK7x691ycSUbLD/FyKKelArkbaAMSSJU8JmqmhwN2+mnJDNINuJWSrh2L0kDk+ZQtbC/gOWUwLw==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "shell-quote": "^1.6.1" - } - }, - "launch-editor-middleware": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/launch-editor-middleware/-/launch-editor-middleware-2.2.1.tgz", - "integrity": "sha512-s0UO2/gEGiCgei3/2UN3SMuUj1phjQN8lcpnvgLSz26fAzNWPQ6Nf/kF5IFClnfU2ehp6LrmKdMU/beveO+2jg==", - "dev": true, - "requires": { - "launch-editor": "^2.2.1" - } - }, - "libsodium": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.9.tgz", - "integrity": "sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A==" - }, - "libsodium-wrappers": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz", - "integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==", - "requires": { - "libsodium": "^0.7.0" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", - "dev": true - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.defaultsdeep": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz", - "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==", - "dev": true - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" - }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "lodash.mapvalues": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.transform": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.transform/-/lodash.transform-4.6.0.tgz", - "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=" - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "logform": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", - "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", - "requires": { - "colors": "^1.2.1", - "fast-safe-stringify": "^2.0.4", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "triple-beam": "^1.3.0" - } - }, - "loglevel": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", - "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", - "dev": true - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.4" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", - "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", - "dev": true - }, - "mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", - "dev": true - }, - "mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", - "dev": true, - "requires": { - "mime-db": "1.46.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz", - "integrity": "sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "normalize-url": "1.9.1", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "moment": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", - "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", - "dev": true - }, - "nanoid": { - "version": "3.1.22", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", - "integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==", - "dev": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", - "dev": true - }, - "node-gyp": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz", - "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==", - "dev": true, - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.3", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "request": "^2.88.2", - "rimraf": "^3.0.2", - "semver": "^7.3.2", - "tar": "^6.0.2", - "which": "^2.0.2" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "node-ipc": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.4.tgz", - "integrity": "sha512-A+f0mn2KxUt1uRTSd5ktxQUsn2OEhj5evo7NUi/powBzMSZ0vocdzDjlq9QN2v3LH6CJi3e5xAenpZ1QwU5A8g==", - "dev": true, - "requires": { - "event-pubsub": "4.3.0", - "js-message": "1.0.7", - "js-queue": "2.0.2" - } - }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", - "dev": true - }, - "node-sass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-5.0.0.tgz", - "integrity": "sha512-opNgmlu83ZCF792U281Ry7tak9IbVC+AKnXGovcQ8LG8wFaJv6cLnRlc6DIHlmNxWEexB5bZxi9SZ9JyUuOYjw==", - "dev": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^7.0.3", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "lodash": "^4.17.15", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.13.2", - "node-gyp": "^7.1.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "2.2.5", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "prepend-http": "^1.0.0", - "query-string": "^4.1.0", - "sort-keys": "^1.0.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "dev": true - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", - "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz", - "integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "has": "^1.0.3" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "requires": { - "fn.name": "1.x.x" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "open": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", - "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - }, - "dependencies": { - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - } - } - }, - "opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - }, - "dependencies": { - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - } - } - }, - "ora": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", - "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true - }, - "p-retry": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", - "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", - "dev": true, - "requires": { - "retry": "^0.12.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", - "dev": true, - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "requires": { - "parse5": "^6.0.1" - }, - "dependencies": { - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - } - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pnp-webpack-plugin": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", - "integrity": "sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==", - "dev": true, - "requires": { - "ts-pnp": "^1.1.6" - } - }, - "portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", - "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", - "dev": true, - "requires": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-load-config": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.2.tgz", - "integrity": "sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", - "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-modules": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.0.0.tgz", - "integrity": "sha512-ghS/ovDzDqARm4Zj6L2ntadjyQMoyJmi0JkLlYtH2QFLrvNlxH5OAVRPWPeKilB0pY7SbuhO173KOWkPAxRJcw==", - "dev": true, - "requires": { - "generic-names": "^2.0.1", - "icss-replace-symbols": "^1.1.0", - "lodash.camelcase": "^4.3.0", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.0", - "postcss-modules-scope": "^3.0.0", - "postcss-modules-values": "^4.0.0", - "string-hash": "^1.1.1" - }, - "dependencies": { - "icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true - }, - "postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true - }, - "postcss-modules-local-by-default": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", - "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", - "dev": true, - "requires": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - } - }, - "postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", - "dev": true, - "requires": { - "postcss-selector-parser": "^6.0.4" - } - }, - "postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "requires": { - "icss-utils": "^5.0.0" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", - "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", - "dev": true, - "requires": { - "postcss": "^7.0.5" - } - }, - "postcss-modules-local-by-default": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz", - "integrity": "sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw==", - "dev": true, - "requires": { - "icss-utils": "^4.1.1", - "postcss": "^7.0.32", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - } - }, - "postcss-modules-scope": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz", - "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", - "dev": true, - "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0" - } - }, - "postcss-modules-values": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", - "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", - "dev": true, - "requires": { - "icss-utils": "^4.0.0", - "postcss": "^7.0.6" - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-selector-parser": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", - "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1", - "util-deprecate": "^1.0.2" - } - }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", - "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", - "dev": true, - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", - "dev": true - }, - "pretty-error": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", - "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==", - "dev": true, - "requires": { - "lodash": "^4.17.20", - "renderkid": "^2.0.4" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "protobufjs": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", - "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - }, - "dependencies": { - "@types/node": { - "version": "13.13.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.48.tgz", - "integrity": "sha512-z8wvSsgWQzkr4sVuMEEOvwMdOQjiRY2Y/ZW4fDfjfe3+TfQrZqFKOthBgk2RnVEmtOKrkwdZ7uTvsxTBLjKGDQ==" - } - } - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "requires": { - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - } - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "optional": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "readonly-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", - "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==" - }, - "reconnecting-websocket": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/reconnecting-websocket/-/reconnecting-websocket-4.4.0.tgz", - "integrity": "sha512-D2E33ceRPga0NvTDhJmphEgJ7FUYF0v4lr1ki0csq06OdlxKfugGzN0dSkxM/NfqCxYELK4KcaTOUOjTV6Dcng==" - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } - }, - "regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", - "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", - "dev": true - }, - "regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", - "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" - } - }, - "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", - "dev": true - }, - "regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.5.tgz", - "integrity": "sha512-ccqoLg+HLOHq1vdfYNm4TBeaCDIi1FLt3wGojTDSvdewUv65oTmI3cnT2E4hRjl1gzKZIPK+KZrXzlUYKnR+vQ==", - "dev": true, - "requires": { - "css-select": "^2.0.2", - "dom-converter": "^0.2", - "htmlparser2": "^3.10.1", - "lodash": "^4.17.20", - "strip-ansi": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sass-graph": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", - "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^13.3.2" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "sass-loader": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.1.1.tgz", - "integrity": "sha512-W6gVDXAd5hR/WHsPicvZdjAWHBcEJ44UahgxcIE196fW2ong0ZHMPO1kZuI5q0VlvMQZh32gpv69PLWQm70qrw==", - "dev": true, - "requires": { - "klona": "^2.0.4", - "loader-utils": "^2.0.0", - "neo-async": "^2.6.2", - "schema-utils": "^3.0.0", - "semver": "^7.3.2" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.8", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", - "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", - "dev": true, - "requires": { - "node-forge": "^0.10.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - } - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - } - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sockjs": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz", - "integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw==", - "dev": true, - "requires": { - "faye-websocket": "^0.11.3", - "uuid": "^3.4.0", - "websocket-driver": "^0.7.4" - } - }, - "sockjs-client": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.1.tgz", - "integrity": "sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ==", - "dev": true, - "requires": { - "debug": "^3.2.6", - "eventsource": "^1.0.7", - "faye-websocket": "^0.11.3", - "inherits": "^2.0.4", - "json3": "^3.3.3", - "url-parse": "^1.5.1" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - }, - "dependencies": { - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - } - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", - "dev": true - }, - "spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", - "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "minipass": "^3.1.1" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "dev": true - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "stackframe": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", - "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "dev": true - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", - "dev": true - }, - "svgo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", - "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - } - } - }, - "symbol-observable": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz", - "integrity": "sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==" - }, - "table": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", - "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", - "requires": { - "ajv": "^8.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "lodash.clonedeep": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - }, - "dependencies": { - "ajv": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.2.tgz", - "integrity": "sha512-V0HGxJd0PiDF0ecHYIesTOqfd1gJguwQUOYfMfAWnRsWQEXfc5ifbUFhD3Wjc+O+y7VAqL+g07prq9gHQ/JOZQ==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true - }, - "tar": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", - "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", - "dev": true, - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "dependencies": { - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", - "integrity": "sha512-/fKw3R+hWyHfYx7Bv6oPqmk4HGQcrWLtV3X6ggvPuwPNHSnzvVV51z6OaaCOus4YLjutYGOz3pEpbhe6Up2s1w==", - "dev": true, - "requires": { - "cacache": "^13.0.1", - "find-cache-dir": "^3.3.1", - "jest-worker": "^25.4.0", - "p-limit": "^2.3.0", - "schema-utils": "^2.6.6", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.6.12", - "webpack-sources": "^1.4.3" - }, - "dependencies": { - "cacache": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", - "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", - "dev": true, - "requires": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.2", - "infer-owner": "^1.0.4", - "lru-cache": "^5.1.1", - "minipass": "^3.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", - "unique-filename": "^1.1.1" - } - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, - "thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dev": true, - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, - "thread-loader": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.3.tgz", - "integrity": "sha512-wNrVKH2Lcf8ZrWxDF/khdlLlsTMczdcwPA9VEK4c2exlEPynYWxi9op3nPTo5lAnDIkE0rQEB3VBP+4Zncc9Hg==", - "dev": true, - "requires": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true - }, - "timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", - "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dev": true, - "requires": { - "glob": "^7.1.2" - } - }, - "tryer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", - "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", - "dev": true - }, - "ts-pnp": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz", - "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==", - "dev": true - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "dev": true, - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-loader": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-2.3.0.tgz", - "integrity": "sha512-goSdg8VY+7nPZKUEChZSEtW5gjbS66USIGCeSJ1OVOJ7Yfuh/36YxCwMi5HVEJh6mqUYOoy3NJ0vlOMrWsSHog==", - "dev": true, - "requires": { - "loader-utils": "^1.2.3", - "mime": "^2.4.4", - "schema-utils": "^2.5.0" - } - }, - "url-parse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", - "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "vue": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.10.tgz", - "integrity": "sha512-6arZ722uqIArSNUU94aqx0Pq0IMHFqYZuJ+U+q9HGdZZu11VFpyFP/L/hakijGFKp56Jr0yxJdWbDiJGWPxwww==", - "requires": { - "@vue/compiler-dom": "3.0.10", - "@vue/runtime-dom": "3.0.10", - "@vue/shared": "3.0.10" - } - }, - "vue-hot-reload-api": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", - "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", - "dev": true - }, - "vue-loader": { - "version": "15.9.6", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.6.tgz", - "integrity": "sha512-j0cqiLzwbeImIC6nVIby2o/ABAWhlppyL/m5oJ67R5MloP0hj/DtFgb0Zmq3J9CG7AJ+AXIvHVnJAPBvrLyuDg==", - "dev": true, - "requires": { - "@vue/component-compiler-utils": "^3.1.0", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - }, - "dependencies": { - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - } - } - }, - "vue-router": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.5.tgz", - "integrity": "sha512-AQq+pllb6FCc7rS6vh4PPcce3XA1jgK3hKNkQ4hXHwoVN7jOeAOMKCnX7XAX3etV9rmN7iNW8iIwgPk95ckBjw==" - }, - "vue-style-loader": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", - "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", - "dev": true, - "requires": { - "hash-sum": "^1.0.2", - "loader-utils": "^1.0.2" - }, - "dependencies": { - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - } - } - }, - "vue-template-es2015-compiler": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", - "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", - "dev": true - }, - "vue-uuid": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/vue-uuid/-/vue-uuid-2.0.2.tgz", - "integrity": "sha512-PRf1CHg3uKi77bVRyAuW2u/T2PO9LxMr7cw9t9rNdpZTkNDyw1Fx6eJVL+8JOtM9VxxPkoZ/rwhXJ5l+X5AYzQ==", - "requires": { - "@types/uuid": "^8.0.0", - "uuid": "^8.1.0" - }, - "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } - }, - "vue3-click-away": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vue3-click-away/-/vue3-click-away-1.1.0.tgz", - "integrity": "sha512-I1d/vX9vCW1on8MA7VeufV73iPL1WPaohzEJAA7SFsMDdUEEt59zW7xV3vEgS+VrwVAzcd3c1oX203RcCWS3Cw==" - }, - "vuex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.0.tgz", - "integrity": "sha512-56VPujlHscP5q/e7Jlpqc40sja4vOhC4uJD1llBCWolVI8ND4+VzisDVkUMl+z5y0MpIImW6HjhNc+ZvuizgOw==" - }, - "watchpack": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", - "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", - "dev": true, - "requires": { - "chokidar": "^3.4.1", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.1" - } - }, - "watchpack-chokidar2": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", - "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", - "dev": true, - "optional": true, - "requires": { - "chokidar": "^2.1.8" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true, - "optional": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, - "webpack": { - "version": "4.46.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", - "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/wasm-edit": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.4.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.5.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.3", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.7.4", - "webpack-sources": "^1.4.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "terser-webpack-plugin": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", - "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", - "dev": true, - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - } - } - } - }, - "webpack-bundle-analyzer": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.9.0.tgz", - "integrity": "sha512-Ob8amZfCm3rMB1ScjQVlbYYUEJyEjdEtQ92jqiFUYt5VkEeO2v5UMbv49P/gnmCZm3A6yaFQzCBvpZqN4MUsdA==", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.19", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "webpack-chain": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-6.5.1.tgz", - "integrity": "sha512-7doO/SRtLu8q5WM0s7vPKPWX580qhi0/yBHkOxNkv50f6qB76Zy9o2wRTrrPULqYTvQlVHuvbA8v+G5ayuUDsA==", - "dev": true, - "requires": { - "deepmerge": "^1.5.2", - "javascript-stringify": "^2.0.1" - } - }, - "webpack-dev-middleware": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz", - "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz", - "integrity": "sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.8", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.3.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.8", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.26", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.8", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "^0.3.21", - "sockjs-client": "^1.5.0", - "spdy": "^4.0.2", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "^13.3.2" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", - "dev": true, - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", - "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "requires": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "requires": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - }, - "dependencies": { - "async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - } - } - }, - "winston-transport": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", - "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", - "requires": { - "readable-stream": "^2.3.7", - "triple-beam": "^1.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xstream": { - "version": "11.14.0", - "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", - "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", - "requires": { - "globalthis": "^1.0.1", - "symbol-observable": "^2.0.3" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", - "dev": true - } - } - }, - "yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", - "dev": true - } - } -} diff --git a/vue/package.json b/vue/package.json deleted file mode 100644 index 5bc97e5..0000000 --- a/vue/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "frontend", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "npm install && vue-cli-service serve", - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@cosmjs/crypto": "^0.24.1", - "@cosmjs/encoding": "^0.24.1", - "@cosmjs/proto-signing": "^0.24.1", - "@cosmjs/stargate": "^0.24.1", - "@starport/vue": "^0.1.38", - "@starport/vuex": "^0.1.41", - "bip39": "^3.0.3", - "core-js": "^3.10.0", - "crypto-js": "^4.0.0", - "file-saver": "^2.0.5", - "moment": "^2.29.1", - "vue": "^3.0.10", - "vue-router": "^4.0.3", - "vue-uuid": "^2.0.2", - "vuex": "^4.0.0" - }, - "devDependencies": { - "@babel/core": "^7.13.8", - "@babel/node": "^7.13.0", - "@vue/cli-plugin-babel": "^4.5.11", - "@vue/cli-plugin-vuex": "^4.5.11", - "@vue/cli-service": "^4.5.11", - "@vue/compiler-sfc": "^3.0.10", - "node-sass": "^5.0.0", - "prettier": "^2.2.1", - "protobufjs": "^6.10.2", - "sass-loader": "^10.1.1" - } -} diff --git a/vue/public/favicon.ico b/vue/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/vue/public/index.html b/vue/public/index.html deleted file mode 100644 index 0ad246d..0000000 --- a/vue/public/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - -
- - - diff --git a/vue/src/App.vue b/vue/src/App.vue deleted file mode 100644 index 31bb7a9..0000000 --- a/vue/src/App.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/vue/src/components/Sidebar.vue b/vue/src/components/Sidebar.vue deleted file mode 100644 index b5a68c8..0000000 --- a/vue/src/components/Sidebar.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/vue/src/main.js b/vue/src/main.js deleted file mode 100644 index d66f979..0000000 --- a/vue/src/main.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createApp } from 'vue' -import App from './App.vue' -import store from './store' -import router from './router' -import vueLib from '@starport/vue' - -const app = createApp(App) -app.config.globalProperties._depsLoaded = true -app.use(store).use(router).use(vueLib).mount('#app') diff --git a/vue/src/router/index.js b/vue/src/router/index.js deleted file mode 100644 index 69bb33d..0000000 --- a/vue/src/router/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import { createRouter, createWebHistory } from 'vue-router' -import Index from '@/views/Index.vue' -import Types from '@/views/Types.vue' - -const routerHistory = createWebHistory() -const routes = [ - { - path: '/', - component: Index - }, - { path: '/types', component: Types } -] - -const router = createRouter({ - history: routerHistory, - routes -}) - -export default router diff --git a/vue/src/scss/app.scss b/vue/src/scss/app.scss deleted file mode 100644 index bd6fd40..0000000 --- a/vue/src/scss/app.scss +++ /dev/null @@ -1 +0,0 @@ -//Your custom styles here \ No newline at end of file diff --git a/vue/src/store/config.js b/vue/src/store/config.js deleted file mode 100644 index aa1ac6e..0000000 --- a/vue/src/store/config.js +++ /dev/null @@ -1,12 +0,0 @@ -import { env, starport, blocks, wallet,transfers } from '@starport/vuex' -import generated from './generated' -export default function init(store) { - for (const moduleInit of Object.values(generated)) { - moduleInit(store) - } - transfers(store) - starport(store) - blocks(store) - env(store) - wallet(store) -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js deleted file mode 100644 index 52c9e02..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js +++ /dev/null @@ -1,314 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { Params } from "./module/types/cosmos/bank/v1beta1/bank"; -import { SendEnabled } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Input } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Output } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Supply } from "./module/types/cosmos/bank/v1beta1/bank"; -import { DenomUnit } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Metadata } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Balance } from "./module/types/cosmos/bank/v1beta1/genesis"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Balance: {}, - AllBalances: {}, - TotalSupply: {}, - SupplyOf: {}, - Params: {}, - DenomMetadata: {}, - DenomsMetadata: {}, - _Structure: { - Params: getStructure(Params.fromPartial({})), - SendEnabled: getStructure(SendEnabled.fromPartial({})), - Input: getStructure(Input.fromPartial({})), - Output: getStructure(Output.fromPartial({})), - Supply: getStructure(Supply.fromPartial({})), - DenomUnit: getStructure(DenomUnit.fromPartial({})), - Metadata: getStructure(Metadata.fromPartial({})), - Balance: getStructure(Balance.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getBalance: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Balance[JSON.stringify(params)] ?? {}; - }, - getAllBalances: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.AllBalances[JSON.stringify(params)] ?? {}; - }, - getTotalSupply: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.TotalSupply[JSON.stringify(params)] ?? {}; - }, - getSupplyOf: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.SupplyOf[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getDenomMetadata: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DenomMetadata[JSON.stringify(params)] ?? {}; - }, - getDenomsMetadata: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DenomsMetadata[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryBalance({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryBalance(key.address, key.denom, query)).data : (await (await initQueryClient(rootGetters)).queryBalance(key.address, key.denom)).data; - commit('QUERY', { query: 'Balance', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryBalance', payload: { options: { all }, params: { ...key }, query } }); - return getters['getBalance']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryBalance', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryAllBalances({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryAllBalances(key.address, query)).data : (await (await initQueryClient(rootGetters)).queryAllBalances(key.address)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryAllBalances(key.address, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'AllBalances', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllBalances', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllBalances']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryAllBalances', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryTotalSupply({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryTotalSupply(query)).data : (await (await initQueryClient(rootGetters)).queryTotalSupply()).data; - commit('QUERY', { query: 'TotalSupply', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryTotalSupply', payload: { options: { all }, params: { ...key }, query } }); - return getters['getTotalSupply']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryTotalSupply', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QuerySupplyOf({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).querySupplyOf(key.denom, query)).data : (await (await initQueryClient(rootGetters)).querySupplyOf(key.denom)).data; - commit('QUERY', { query: 'SupplyOf', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySupplyOf', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSupplyOf']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QuerySupplyOf', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryParams(query)).data : (await (await initQueryClient(rootGetters)).queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDenomMetadata({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDenomMetadata(key.denom, query)).data : (await (await initQueryClient(rootGetters)).queryDenomMetadata(key.denom)).data; - commit('QUERY', { query: 'DenomMetadata', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomMetadata', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomMetadata']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomMetadata', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDenomsMetadata({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDenomsMetadata(query)).data : (await (await initQueryClient(rootGetters)).queryDenomsMetadata()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryDenomsMetadata({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'DenomsMetadata', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomsMetadata', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomsMetadata']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomsMetadata', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgMultiSend({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgMultiSend(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMultiSend:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgSend({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSend(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSend:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgMultiSend({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgMultiSend(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMultiSend:Create', 'Could not create message.'); - } - } - }, - async MsgSend({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSend(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSend:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts deleted file mode 100644 index 99aebe8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { Params } from "./module/types/cosmos/bank/v1beta1/bank" -import { SendEnabled } from "./module/types/cosmos/bank/v1beta1/bank" -import { Input } from "./module/types/cosmos/bank/v1beta1/bank" -import { Output } from "./module/types/cosmos/bank/v1beta1/bank" -import { Supply } from "./module/types/cosmos/bank/v1beta1/bank" -import { DenomUnit } from "./module/types/cosmos/bank/v1beta1/bank" -import { Metadata } from "./module/types/cosmos/bank/v1beta1/bank" -import { Balance } from "./module/types/cosmos/bank/v1beta1/genesis" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Balance: {}, - AllBalances: {}, - TotalSupply: {}, - SupplyOf: {}, - Params: {}, - DenomMetadata: {}, - DenomsMetadata: {}, - - _Structure: { - Params: getStructure(Params.fromPartial({})), - SendEnabled: getStructure(SendEnabled.fromPartial({})), - Input: getStructure(Input.fromPartial({})), - Output: getStructure(Output.fromPartial({})), - Supply: getStructure(Supply.fromPartial({})), - DenomUnit: getStructure(DenomUnit.fromPartial({})), - Metadata: getStructure(Metadata.fromPartial({})), - Balance: getStructure(Balance.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getBalance: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Balance[JSON.stringify(params)] ?? {} - }, - getAllBalances: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.AllBalances[JSON.stringify(params)] ?? {} - }, - getTotalSupply: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.TotalSupply[JSON.stringify(params)] ?? {} - }, - getSupplyOf: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.SupplyOf[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDenomMetadata: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomMetadata[JSON.stringify(params)] ?? {} - }, - getDenomsMetadata: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomsMetadata[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryBalance({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryBalance( key.address, key.denom, query)).data:(await (await initQueryClient(rootGetters)).queryBalance( key.address , key.denom )).data - - commit('QUERY', { query: 'Balance', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryBalance', payload: { options: { all }, params: {...key},query }}) - return getters['getBalance']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryBalance', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryAllBalances({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryAllBalances( key.address, query)).data:(await (await initQueryClient(rootGetters)).queryAllBalances( key.address )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryAllBalances( key.address, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'AllBalances', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllBalances', payload: { options: { all }, params: {...key},query }}) - return getters['getAllBalances']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryAllBalances', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryTotalSupply({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryTotalSupply( query)).data:(await (await initQueryClient(rootGetters)).queryTotalSupply()).data - - commit('QUERY', { query: 'TotalSupply', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryTotalSupply', payload: { options: { all }, params: {...key},query }}) - return getters['getTotalSupply']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryTotalSupply', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QuerySupplyOf({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).querySupplyOf( key.denom, query)).data:(await (await initQueryClient(rootGetters)).querySupplyOf( key.denom )).data - - commit('QUERY', { query: 'SupplyOf', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySupplyOf', payload: { options: { all }, params: {...key},query }}) - return getters['getSupplyOf']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QuerySupplyOf', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryParams( query)).data:(await (await initQueryClient(rootGetters)).queryParams()).data - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDenomMetadata({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDenomMetadata( key.denom, query)).data:(await (await initQueryClient(rootGetters)).queryDenomMetadata( key.denom )).data - - commit('QUERY', { query: 'DenomMetadata', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomMetadata', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomMetadata']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomMetadata', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDenomsMetadata({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDenomsMetadata( query)).data:(await (await initQueryClient(rootGetters)).queryDenomsMetadata()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryDenomsMetadata({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'DenomsMetadata', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomsMetadata', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomsMetadata']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomsMetadata', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgMultiSend({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgMultiSend(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgMultiSend:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgSend({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSend(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSend:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgMultiSend({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgMultiSend(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgMultiSend:Create', 'Could not create message.') - } - } - }, - async MsgSend({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSend(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSend:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts deleted file mode 100644 index 2256a43..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgMultiSend: (data: MsgMultiSend) => EncodeObject; - msgSend: (data: MsgSend) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js deleted file mode 100644 index b463228..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js +++ /dev/null @@ -1,30 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; -const types = [ - ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], - ["/cosmos.bank.v1beta1.MsgSend", MsgSend], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgMultiSend: (data) => ({ typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: data }), - msgSend: (data) => ({ typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts deleted file mode 100644 index f1e4832..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts +++ /dev/null @@ -1,58 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; - - -const types = [ - ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], - ["/cosmos.bank.v1beta1.MsgSend", MsgSend], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgMultiSend: (data: MsgMultiSend): EncodeObject => ({ typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: data }), - msgSend: (data: MsgSend): EncodeObject => ({ typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts deleted file mode 100644 index b5c92be..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,326 +0,0 @@ -export interface ProtobufAny { - typeUrl?: string; - /** @format byte */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* DenomUnit represents a struct that describes a given -denomination unit of the basic token. -*/ -export interface V1Beta1DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom?: string; - /** - * exponent represents power of 10 exponent that one must - * raise the base_denom to in order to equal the given DenomUnit's denom - * 1 denom = 1^exponent base_denom - * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - * exponent = 6, thus: 1 atom = 10^6 uatom). - * @format int64 - */ - exponent?: number; - aliases?: string[]; -} -/** - * Input models transaction input. - */ -export interface V1Beta1Input { - address?: string; - coins?: V1Beta1Coin[]; -} -/** -* Metadata represents a struct that describes -a basic token. -*/ -export interface V1Beta1Metadata { - description?: string; - denomUnits?: V1Beta1DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base?: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display?: string; -} -/** - * MsgMultiSendResponse defines the Msg/MultiSend response type. - */ -export declare type V1Beta1MsgMultiSendResponse = object; -/** - * MsgSendResponse defines the Msg/Send response type. - */ -export declare type V1Beta1MsgSendResponse = object; -/** - * Output models transaction outputs. - */ -export interface V1Beta1Output { - address?: string; - coins?: V1Beta1Coin[]; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params defines the parameters for the bank module. - */ -export interface V1Beta1Params { - sendEnabled?: V1Beta1SendEnabled[]; - defaultSendEnabled?: boolean; -} -/** -* QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -method. -*/ -export interface V1Beta1QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances?: V1Beta1Coin[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryBalanceResponse is the response type for the Query/Balance RPC method. - */ -export interface V1Beta1QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance?: V1Beta1Coin; -} -/** -* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata?: V1Beta1Metadata; -} -/** -* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas?: V1Beta1Metadata[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryParamsResponse defines the response type for querying x/bank parameters. - */ -export interface V1Beta1QueryParamsResponse { - /** Params defines the parameters for the bank module. */ - params?: V1Beta1Params; -} -/** - * QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. - */ -export interface V1Beta1QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount?: V1Beta1Coin; -} -export interface V1Beta1QueryTotalSupplyResponse { - supply?: V1Beta1Coin[]; -} -/** -* SendEnabled maps coin denom to a send_enabled status (whether a denom is -sendable). -*/ -export interface V1Beta1SendEnabled { - denom?: string; - enabled?: boolean; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/bank/v1beta1/bank.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - queryAllBalances: (address: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/{denom} - */ - queryBalance: (address: string, denom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - queryDenomsMetadata: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - queryDenomMetadata: (denom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryTotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - queryTotalSupply: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - querySupplyOf: (denom: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js deleted file mode 100644 index bdee86f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/bank/v1beta1/bank.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryAllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - this.queryAllBalances = (address, query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/{denom} - */ - this.queryBalance = (address, denom, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}/${denom}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - this.queryDenomsMetadata = (query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - this.queryDenomMetadata = (denom, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryTotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - this.queryTotalSupply = (params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/supply`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - this.querySupplyOf = (denom, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/supply/${denom}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts deleted file mode 100644 index 05f7d93..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts +++ /dev/null @@ -1,561 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - typeUrl?: string; - - /** @format byte */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* DenomUnit represents a struct that describes a given -denomination unit of the basic token. -*/ -export interface V1Beta1DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom?: string; - - /** - * exponent represents power of 10 exponent that one must - * raise the base_denom to in order to equal the given DenomUnit's denom - * 1 denom = 1^exponent base_denom - * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - * exponent = 6, thus: 1 atom = 10^6 uatom). - * @format int64 - */ - exponent?: number; - aliases?: string[]; -} - -/** - * Input models transaction input. - */ -export interface V1Beta1Input { - address?: string; - coins?: V1Beta1Coin[]; -} - -/** -* Metadata represents a struct that describes -a basic token. -*/ -export interface V1Beta1Metadata { - description?: string; - denomUnits?: V1Beta1DenomUnit[]; - - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base?: string; - - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display?: string; -} - -/** - * MsgMultiSendResponse defines the Msg/MultiSend response type. - */ -export type V1Beta1MsgMultiSendResponse = object; - -/** - * MsgSendResponse defines the Msg/Send response type. - */ -export type V1Beta1MsgSendResponse = object; - -/** - * Output models transaction outputs. - */ -export interface V1Beta1Output { - address?: string; - coins?: V1Beta1Coin[]; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the parameters for the bank module. - */ -export interface V1Beta1Params { - sendEnabled?: V1Beta1SendEnabled[]; - defaultSendEnabled?: boolean; -} - -/** -* QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -method. -*/ -export interface V1Beta1QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances?: V1Beta1Coin[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryBalanceResponse is the response type for the Query/Balance RPC method. - */ -export interface V1Beta1QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance?: V1Beta1Coin; -} - -/** -* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata?: V1Beta1Metadata; -} - -/** -* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas?: V1Beta1Metadata[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse defines the response type for querying x/bank parameters. - */ -export interface V1Beta1QueryParamsResponse { - /** Params defines the parameters for the bank module. */ - params?: V1Beta1Params; -} - -/** - * QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. - */ -export interface V1Beta1QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount?: V1Beta1Coin; -} - -export interface V1Beta1QueryTotalSupplyResponse { - supply?: V1Beta1Coin[]; -} - -/** -* SendEnabled maps coin denom to a send_enabled status (whether a denom is -sendable). -*/ -export interface V1Beta1SendEnabled { - denom?: string; - enabled?: boolean; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/bank/v1beta1/bank.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - queryAllBalances = ( - address: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/{denom} - */ - queryBalance = (address: string, denom: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}/${denom}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - queryDenomsMetadata = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - queryDenomMetadata = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryTotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - queryTotalSupply = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/supply`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - querySupplyOf = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/supply/${denom}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts deleted file mode 100644 index 9bd6fa2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** Params defines the parameters for the bank module. */ -export interface Params { - sendEnabled: SendEnabled[]; - defaultSendEnabled: boolean; -} -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - */ -export interface Supply { - total: Coin[]; -} -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * exponent represents power of 10 exponent that one must - * raise the base_denom to in order to equal the given DenomUnit's denom - * 1 denom = 1^exponent base_denom - * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - * exponent = 6, thus: 1 atom = 10^6 uatom). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denomUnits: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const SendEnabled: { - encode(message: SendEnabled, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SendEnabled; - fromJSON(object: any): SendEnabled; - toJSON(message: SendEnabled): unknown; - fromPartial(object: DeepPartial): SendEnabled; -}; -export declare const Input: { - encode(message: Input, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Input; - fromJSON(object: any): Input; - toJSON(message: Input): unknown; - fromPartial(object: DeepPartial): Input; -}; -export declare const Output: { - encode(message: Output, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Output; - fromJSON(object: any): Output; - toJSON(message: Output): unknown; - fromPartial(object: DeepPartial): Output; -}; -export declare const Supply: { - encode(message: Supply, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Supply; - fromJSON(object: any): Supply; - toJSON(message: Supply): unknown; - fromPartial(object: DeepPartial): Supply; -}; -export declare const DenomUnit: { - encode(message: DenomUnit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomUnit; - fromJSON(object: any): DenomUnit; - toJSON(message: DenomUnit): unknown; - fromPartial(object: DeepPartial): DenomUnit; -}; -export declare const Metadata: { - encode(message: Metadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Metadata; - fromJSON(object: any): Metadata; - toJSON(message: Metadata): unknown; - fromPartial(object: DeepPartial): Metadata; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js deleted file mode 100644 index 88925b6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js +++ /dev/null @@ -1,572 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseParams = { defaultSendEnabled: false }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.sendEnabled) { - SendEnabled.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.defaultSendEnabled === true) { - writer.uint32(16).bool(message.defaultSendEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.sendEnabled = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromJSON(e)); - } - } - if (object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null) { - message.defaultSendEnabled = Boolean(object.defaultSendEnabled); - } - else { - message.defaultSendEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.sendEnabled) { - obj.sendEnabled = message.sendEnabled.map((e) => e ? SendEnabled.toJSON(e) : undefined); - } - else { - obj.sendEnabled = []; - } - message.defaultSendEnabled !== undefined && - (obj.defaultSendEnabled = message.defaultSendEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromPartial(e)); - } - } - if (object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null) { - message.defaultSendEnabled = object.defaultSendEnabled; - } - else { - message.defaultSendEnabled = false; - } - return message; - }, -}; -const baseSendEnabled = { denom: "", enabled: false }; -export const SendEnabled = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendEnabled }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSendEnabled }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = Boolean(object.enabled); - } - else { - message.enabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseSendEnabled }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = object.enabled; - } - else { - message.enabled = false; - } - return message; - }, -}; -const baseInput = { address: "" }; -export const Input = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInput }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseInput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseInput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseOutput = { address: "" }; -export const Output = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOutput }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOutput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOutput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseSupply = {}; -export const Supply = { - encode(message, writer = Writer.create()) { - for (const v of message.total) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSupply }; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSupply }; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.total) { - obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.total = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSupply }; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseDenomUnit = { denom: "", exponent: 0, aliases: "" }; -export const DenomUnit = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomUnit }; - message.aliases = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenomUnit }; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = Number(object.exponent); - } - else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = message.exponent); - if (message.aliases) { - obj.aliases = message.aliases.map((e) => e); - } - else { - obj.aliases = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDenomUnit }; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = object.exponent; - } - else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(e); - } - } - return message; - }, -}; -const baseMetadata = { description: "", base: "", display: "" }; -export const Metadata = { - encode(message, writer = Writer.create()) { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denomUnits) { - DenomUnit.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMetadata }; - message.denomUnits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denomUnits.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMetadata }; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromJSON(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = String(object.base); - } - else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = String(object.display); - } - else { - message.display = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description); - if (message.denomUnits) { - obj.denomUnits = message.denomUnits.map((e) => e ? DenomUnit.toJSON(e) : undefined); - } - else { - obj.denomUnits = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - return obj; - }, - fromPartial(object) { - const message = { ...baseMetadata }; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromPartial(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = object.base; - } - else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = object.display; - } - else { - message.display = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts deleted file mode 100644 index 8e9c72d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts +++ /dev/null @@ -1,679 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** Params defines the parameters for the bank module. */ -export interface Params { - sendEnabled: SendEnabled[]; - defaultSendEnabled: boolean; -} - -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} - -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} - -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} - -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - */ -export interface Supply { - total: Coin[]; -} - -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * exponent represents power of 10 exponent that one must - * raise the base_denom to in order to equal the given DenomUnit's denom - * 1 denom = 1^exponent base_denom - * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - * exponent = 6, thus: 1 atom = 10^6 uatom). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} - -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denomUnits: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; -} - -const baseParams: object = { defaultSendEnabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.sendEnabled) { - SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.defaultSendEnabled === true) { - writer.uint32(16).bool(message.defaultSendEnabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.sendEnabled = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromJSON(e)); - } - } - if ( - object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null - ) { - message.defaultSendEnabled = Boolean(object.defaultSendEnabled); - } else { - message.defaultSendEnabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.sendEnabled) { - obj.sendEnabled = message.sendEnabled.map((e) => - e ? SendEnabled.toJSON(e) : undefined - ); - } else { - obj.sendEnabled = []; - } - message.defaultSendEnabled !== undefined && - (obj.defaultSendEnabled = message.defaultSendEnabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromPartial(e)); - } - } - if ( - object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null - ) { - message.defaultSendEnabled = object.defaultSendEnabled; - } else { - message.defaultSendEnabled = false; - } - return message; - }, -}; - -const baseSendEnabled: object = { denom: "", enabled: false }; - -export const SendEnabled = { - encode(message: SendEnabled, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SendEnabled { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendEnabled } as SendEnabled; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SendEnabled { - const message = { ...baseSendEnabled } as SendEnabled; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = Boolean(object.enabled); - } else { - message.enabled = false; - } - return message; - }, - - toJSON(message: SendEnabled): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - - fromPartial(object: DeepPartial): SendEnabled { - const message = { ...baseSendEnabled } as SendEnabled; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = object.enabled; - } else { - message.enabled = false; - } - return message; - }, -}; - -const baseInput: object = { address: "" }; - -export const Input = { - encode(message: Input, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Input { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInput } as Input; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Input { - const message = { ...baseInput } as Input; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Input): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Input { - const message = { ...baseInput } as Input; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOutput: object = { address: "" }; - -export const Output = { - encode(message: Output, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Output { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOutput } as Output; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Output { - const message = { ...baseOutput } as Output; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Output): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Output { - const message = { ...baseOutput } as Output; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSupply: object = {}; - -export const Supply = { - encode(message: Supply, writer: Writer = Writer.create()): Writer { - for (const v of message.total) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Supply { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSupply } as Supply; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Supply { - const message = { ...baseSupply } as Supply; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Supply): unknown { - const obj: any = {}; - if (message.total) { - obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.total = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Supply { - const message = { ...baseSupply } as Supply; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDenomUnit: object = { denom: "", exponent: 0, aliases: "" }; - -export const DenomUnit = { - encode(message: DenomUnit, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomUnit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomUnit { - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = Number(object.exponent); - } else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(String(e)); - } - } - return message; - }, - - toJSON(message: DenomUnit): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = message.exponent); - if (message.aliases) { - obj.aliases = message.aliases.map((e) => e); - } else { - obj.aliases = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DenomUnit { - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = object.exponent; - } else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(e); - } - } - return message; - }, -}; - -const baseMetadata: object = { description: "", base: "", display: "" }; - -export const Metadata = { - encode(message: Metadata, writer: Writer = Writer.create()): Writer { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denomUnits) { - DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Metadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMetadata } as Metadata; - message.denomUnits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denomUnits.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Metadata { - const message = { ...baseMetadata } as Metadata; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromJSON(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = String(object.base); - } else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = String(object.display); - } else { - message.display = ""; - } - return message; - }, - - toJSON(message: Metadata): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); - if (message.denomUnits) { - obj.denomUnits = message.denomUnits.map((e) => - e ? DenomUnit.toJSON(e) : undefined - ); - } else { - obj.denomUnits = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - return obj; - }, - - fromPartial(object: DeepPartial): Metadata { - const message = { ...baseMetadata } as Metadata; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromPartial(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = object.base; - } else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = object.display; - } else { - message.display = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts deleted file mode 100644 index fa786cb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** balances is an array containing the balances of all the accounts. */ - balances: Balance[]; - /** supply represents the total supply. */ - supply: Coin[]; - /** denom_metadata defines the metadata of the differents coins. */ - denomMetadata: Metadata[]; -} -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface Balance { - /** address is the address of the balance holder. */ - address: string; - /** coins defines the different coins this balance holds. */ - coins: Coin[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const Balance: { - encode(message: Balance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Balance; - fromJSON(object: any): Balance; - toJSON(message: Balance): unknown; - fromPartial(object: DeepPartial): Balance; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js deleted file mode 100644 index 6637c90..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js +++ /dev/null @@ -1,208 +0,0 @@ -/* eslint-disable */ -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.balances) { - Balance.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.supply) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.denomMetadata) { - Metadata.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.balances.push(Balance.decode(reader, reader.uint32())); - break; - case 3: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.denomMetadata.push(Metadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromJSON(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - if (object.denomMetadata !== undefined && object.denomMetadata !== null) { - for (const e of object.denomMetadata) { - message.denomMetadata.push(Metadata.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.balances) { - obj.balances = message.balances.map((e) => e ? Balance.toJSON(e) : undefined); - } - else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.supply = []; - } - if (message.denomMetadata) { - obj.denomMetadata = message.denomMetadata.map((e) => e ? Metadata.toJSON(e) : undefined); - } - else { - obj.denomMetadata = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromPartial(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - if (object.denomMetadata !== undefined && object.denomMetadata !== null) { - for (const e of object.denomMetadata) { - message.denomMetadata.push(Metadata.fromPartial(e)); - } - } - return message; - }, -}; -const baseBalance = { address: "" }; -export const Balance = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBalance }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBalance }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseBalance }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts deleted file mode 100644 index e3c7559..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* eslint-disable */ -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** balances is an array containing the balances of all the accounts. */ - balances: Balance[]; - /** supply represents the total supply. */ - supply: Coin[]; - /** denom_metadata defines the metadata of the differents coins. */ - denomMetadata: Metadata[]; -} - -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface Balance { - /** address is the address of the balance holder. */ - address: string; - /** coins defines the different coins this balance holds. */ - coins: Coin[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.balances) { - Balance.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.supply) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.denomMetadata) { - Metadata.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.balances.push(Balance.decode(reader, reader.uint32())); - break; - case 3: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.denomMetadata.push(Metadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromJSON(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - if (object.denomMetadata !== undefined && object.denomMetadata !== null) { - for (const e of object.denomMetadata) { - message.denomMetadata.push(Metadata.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.balances) { - obj.balances = message.balances.map((e) => - e ? Balance.toJSON(e) : undefined - ); - } else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.supply = []; - } - if (message.denomMetadata) { - obj.denomMetadata = message.denomMetadata.map((e) => - e ? Metadata.toJSON(e) : undefined - ); - } else { - obj.denomMetadata = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromPartial(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - if (object.denomMetadata !== undefined && object.denomMetadata !== null) { - for (const e of object.denomMetadata) { - message.denomMetadata.push(Metadata.fromPartial(e)); - } - } - return message; - }, -}; - -const baseBalance: object = { address: "" }; - -export const Balance = { - encode(message: Balance, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Balance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBalance } as Balance; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Balance { - const message = { ...baseBalance } as Balance; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Balance): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Balance { - const message = { ...baseBalance } as Balance; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts deleted file mode 100644 index b1a5b44..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequest { - /** address is the address to query balances for. */ - address: string; - /** denom is the coin denom to query balances for. */ - denom: string; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance: Coin | undefined; -} -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequest { - /** address is the address to query balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequest { -} -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponse { - /** supply is the supply of the coins */ - supply: Coin[]; -} -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequest { - /** denom is the coin denom to query balances for. */ - denom: string; -} -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount: Coin | undefined; -} -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponse { - params: Params | undefined; -} -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas: Metadata[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequest { - /** denom is the coin denom to query the metadata for. */ - denom: string; -} -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata: Metadata | undefined; -} -export declare const QueryBalanceRequest: { - encode(message: QueryBalanceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryBalanceRequest; - fromJSON(object: any): QueryBalanceRequest; - toJSON(message: QueryBalanceRequest): unknown; - fromPartial(object: DeepPartial): QueryBalanceRequest; -}; -export declare const QueryBalanceResponse: { - encode(message: QueryBalanceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryBalanceResponse; - fromJSON(object: any): QueryBalanceResponse; - toJSON(message: QueryBalanceResponse): unknown; - fromPartial(object: DeepPartial): QueryBalanceResponse; -}; -export declare const QueryAllBalancesRequest: { - encode(message: QueryAllBalancesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllBalancesRequest; - fromJSON(object: any): QueryAllBalancesRequest; - toJSON(message: QueryAllBalancesRequest): unknown; - fromPartial(object: DeepPartial): QueryAllBalancesRequest; -}; -export declare const QueryAllBalancesResponse: { - encode(message: QueryAllBalancesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllBalancesResponse; - fromJSON(object: any): QueryAllBalancesResponse; - toJSON(message: QueryAllBalancesResponse): unknown; - fromPartial(object: DeepPartial): QueryAllBalancesResponse; -}; -export declare const QueryTotalSupplyRequest: { - encode(_: QueryTotalSupplyRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTotalSupplyRequest; - fromJSON(_: any): QueryTotalSupplyRequest; - toJSON(_: QueryTotalSupplyRequest): unknown; - fromPartial(_: DeepPartial): QueryTotalSupplyRequest; -}; -export declare const QueryTotalSupplyResponse: { - encode(message: QueryTotalSupplyResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTotalSupplyResponse; - fromJSON(object: any): QueryTotalSupplyResponse; - toJSON(message: QueryTotalSupplyResponse): unknown; - fromPartial(object: DeepPartial): QueryTotalSupplyResponse; -}; -export declare const QuerySupplyOfRequest: { - encode(message: QuerySupplyOfRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfRequest; - fromJSON(object: any): QuerySupplyOfRequest; - toJSON(message: QuerySupplyOfRequest): unknown; - fromPartial(object: DeepPartial): QuerySupplyOfRequest; -}; -export declare const QuerySupplyOfResponse: { - encode(message: QuerySupplyOfResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfResponse; - fromJSON(object: any): QuerySupplyOfResponse; - toJSON(message: QuerySupplyOfResponse): unknown; - fromPartial(object: DeepPartial): QuerySupplyOfResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryDenomsMetadataRequest: { - encode(message: QueryDenomsMetadataRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomsMetadataRequest; - fromJSON(object: any): QueryDenomsMetadataRequest; - toJSON(message: QueryDenomsMetadataRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomsMetadataRequest; -}; -export declare const QueryDenomsMetadataResponse: { - encode(message: QueryDenomsMetadataResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomsMetadataResponse; - fromJSON(object: any): QueryDenomsMetadataResponse; - toJSON(message: QueryDenomsMetadataResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomsMetadataResponse; -}; -export declare const QueryDenomMetadataRequest: { - encode(message: QueryDenomMetadataRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomMetadataRequest; - fromJSON(object: any): QueryDenomMetadataRequest; - toJSON(message: QueryDenomMetadataRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomMetadataRequest; -}; -export declare const QueryDenomMetadataResponse: { - encode(message: QueryDenomMetadataResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomMetadataResponse; - fromJSON(object: any): QueryDenomMetadataResponse; - toJSON(message: QueryDenomMetadataResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomMetadataResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the balance of a single coin for a single account. */ - Balance(request: QueryBalanceRequest): Promise; - /** AllBalances queries the balance of all coins for a single account. */ - AllBalances(request: QueryAllBalancesRequest): Promise; - /** TotalSupply queries the total supply of all coins. */ - TotalSupply(request: QueryTotalSupplyRequest): Promise; - /** SupplyOf queries the supply of a single coin. */ - SupplyOf(request: QuerySupplyOfRequest): Promise; - /** Params queries the parameters of x/bank module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomsMetadata queries the client metadata of a given coin denomination. */ - DenomMetadata(request: QueryDenomMetadataRequest): Promise; - /** DenomsMetadata queries the client metadata for all registered coin denominations. */ - DenomsMetadata(request: QueryDenomsMetadataRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Balance(request: QueryBalanceRequest): Promise; - AllBalances(request: QueryAllBalancesRequest): Promise; - TotalSupply(request: QueryTotalSupplyRequest): Promise; - SupplyOf(request: QuerySupplyOfRequest): Promise; - Params(request: QueryParamsRequest): Promise; - DenomMetadata(request: QueryDenomMetadataRequest): Promise; - DenomsMetadata(request: QueryDenomsMetadataRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js deleted file mode 100644 index 37fcadb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js +++ /dev/null @@ -1,884 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseQueryBalanceRequest = { address: "", denom: "" }; -export const QueryBalanceRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryBalanceRequest }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryBalanceRequest }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryBalanceResponse = {}; -export const QueryBalanceResponse = { - encode(message, writer = Writer.create()) { - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryBalanceResponse }; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryBalanceResponse }; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, -}; -const baseQueryAllBalancesRequest = { address: "" }; -export const QueryAllBalancesRequest = { - encode(message, writer = Writer.create()) { - 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, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllBalancesRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllBalancesRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllBalancesResponse = {}; -export const QueryAllBalancesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.balances) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesResponse, - }; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllBalancesResponse, - }; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllBalancesResponse, - }; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryTotalSupplyRequest = {}; -export const QueryTotalSupplyRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryTotalSupplyRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryTotalSupplyRequest, - }; - return message; - }, -}; -const baseQueryTotalSupplyResponse = {}; -export const QueryTotalSupplyResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.supply) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyResponse, - }; - message.supply = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTotalSupplyResponse, - }; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.supply = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTotalSupplyResponse, - }; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseQuerySupplyOfRequest = { denom: "" }; -export const QuerySupplyOfRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQuerySupplyOfRequest }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { ...baseQuerySupplyOfRequest }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQuerySupplyOfResponse = {}; -export const QuerySupplyOfResponse = { - encode(message, writer = Writer.create()) { - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQuerySupplyOfResponse }; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQuerySupplyOfResponse }; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryDenomsMetadataRequest = {}; -export const QueryDenomsMetadataRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomsMetadataRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomsMetadataRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDenomsMetadataResponse = {}; -export const QueryDenomsMetadataResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.metadatas) { - Metadata.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataResponse, - }; - message.metadatas = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadatas.push(Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomsMetadataResponse, - }; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map((e) => e ? Metadata.toJSON(e) : undefined); - } - else { - obj.metadatas = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomsMetadataResponse, - }; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDenomMetadataRequest = { denom: "" }; -export const QueryDenomMetadataRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryDenomMetadataResponse = {}; -export const QueryDenomMetadataResponse = { - encode(message, writer = Writer.create()) { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomMetadataResponse, - }; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromJSON(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.metadata !== undefined && - (obj.metadata = message.metadata - ? Metadata.toJSON(message.metadata) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomMetadataResponse, - }; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromPartial(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Balance(request) { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Balance", data); - return promise.then((data) => QueryBalanceResponse.decode(new Reader(data))); - } - AllBalances(request) { - const data = QueryAllBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "AllBalances", data); - return promise.then((data) => QueryAllBalancesResponse.decode(new Reader(data))); - } - TotalSupply(request) { - const data = QueryTotalSupplyRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "TotalSupply", data); - return promise.then((data) => QueryTotalSupplyResponse.decode(new Reader(data))); - } - SupplyOf(request) { - const data = QuerySupplyOfRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SupplyOf", data); - return promise.then((data) => QuerySupplyOfResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - DenomMetadata(request) { - const data = QueryDenomMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomMetadata", data); - return promise.then((data) => QueryDenomMetadataResponse.decode(new Reader(data))); - } - DenomsMetadata(request) { - const data = QueryDenomsMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomsMetadata", data); - return promise.then((data) => QueryDenomsMetadataResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts deleted file mode 100644 index 78e8604..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts +++ /dev/null @@ -1,1226 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequest { - /** address is the address to query balances for. */ - address: string; - /** denom is the coin denom to query balances for. */ - denom: string; -} - -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance: Coin | undefined; -} - -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequest { - /** address is the address to query balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequest {} - -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponse { - /** supply is the supply of the coins */ - supply: Coin[]; -} - -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequest { - /** denom is the coin denom to query balances for. */ - denom: string; -} - -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount: Coin | undefined; -} - -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponse { - params: Params | undefined; -} - -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas: Metadata[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequest { - /** denom is the coin denom to query the metadata for. */ - denom: string; -} - -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata: Metadata | undefined; -} - -const baseQueryBalanceRequest: object = { address: "", denom: "" }; - -export const QueryBalanceRequest = { - encode( - message: QueryBalanceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryBalanceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryBalanceRequest { - const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryBalanceRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial(object: DeepPartial): QueryBalanceRequest { - const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryBalanceResponse: object = {}; - -export const QueryBalanceResponse = { - encode( - message: QueryBalanceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryBalanceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryBalanceResponse { - const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } else { - message.balance = undefined; - } - return message; - }, - - toJSON(message: QueryBalanceResponse): unknown { - const obj: any = {}; - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryBalanceResponse { - const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } else { - message.balance = undefined; - } - return message; - }, -}; - -const baseQueryAllBalancesRequest: object = { address: "" }; - -export const QueryAllBalancesRequest = { - encode( - message: QueryAllBalancesRequest, - writer: Writer = Writer.create() - ): 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: Reader | Uint8Array, length?: number): QueryAllBalancesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesRequest, - } as QueryAllBalancesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllBalancesRequest { - const message = { - ...baseQueryAllBalancesRequest, - } as QueryAllBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllBalancesRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllBalancesRequest { - const message = { - ...baseQueryAllBalancesRequest, - } as QueryAllBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllBalancesResponse: object = {}; - -export const QueryAllBalancesResponse = { - encode( - message: QueryAllBalancesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.balances) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllBalancesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesResponse, - } as QueryAllBalancesResponse; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllBalancesResponse { - const message = { - ...baseQueryAllBalancesResponse, - } as QueryAllBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllBalancesResponse): unknown { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllBalancesResponse { - const message = { - ...baseQueryAllBalancesResponse, - } as QueryAllBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryTotalSupplyRequest: object = {}; - -export const QueryTotalSupplyRequest = { - encode(_: QueryTotalSupplyRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryTotalSupplyRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyRequest, - } as QueryTotalSupplyRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryTotalSupplyRequest { - const message = { - ...baseQueryTotalSupplyRequest, - } as QueryTotalSupplyRequest; - return message; - }, - - toJSON(_: QueryTotalSupplyRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryTotalSupplyRequest { - const message = { - ...baseQueryTotalSupplyRequest, - } as QueryTotalSupplyRequest; - return message; - }, -}; - -const baseQueryTotalSupplyResponse: object = {}; - -export const QueryTotalSupplyResponse = { - encode( - message: QueryTotalSupplyResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.supply) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryTotalSupplyResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyResponse, - } as QueryTotalSupplyResponse; - message.supply = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTotalSupplyResponse { - const message = { - ...baseQueryTotalSupplyResponse, - } as QueryTotalSupplyResponse; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryTotalSupplyResponse): unknown { - const obj: any = {}; - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.supply = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTotalSupplyResponse { - const message = { - ...baseQueryTotalSupplyResponse, - } as QueryTotalSupplyResponse; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQuerySupplyOfRequest: object = { denom: "" }; - -export const QuerySupplyOfRequest = { - encode( - message: QuerySupplyOfRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySupplyOfRequest { - const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QuerySupplyOfRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial(object: DeepPartial): QuerySupplyOfRequest { - const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQuerySupplyOfResponse: object = {}; - -export const QuerySupplyOfResponse = { - encode( - message: QuerySupplyOfResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySupplyOfResponse { - const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: QuerySupplyOfResponse): unknown { - const obj: any = {}; - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySupplyOfResponse { - const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryDenomsMetadataRequest: object = {}; - -export const QueryDenomsMetadataRequest = { - encode( - message: QueryDenomsMetadataRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomsMetadataRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataRequest, - } as QueryDenomsMetadataRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomsMetadataRequest { - const message = { - ...baseQueryDenomsMetadataRequest, - } as QueryDenomsMetadataRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomsMetadataRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomsMetadataRequest { - const message = { - ...baseQueryDenomsMetadataRequest, - } as QueryDenomsMetadataRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomsMetadataResponse: object = {}; - -export const QueryDenomsMetadataResponse = { - encode( - message: QueryDenomsMetadataResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.metadatas) { - Metadata.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomsMetadataResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataResponse, - } as QueryDenomsMetadataResponse; - message.metadatas = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadatas.push(Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomsMetadataResponse { - const message = { - ...baseQueryDenomsMetadataResponse, - } as QueryDenomsMetadataResponse; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomsMetadataResponse): unknown { - const obj: any = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map((e) => - e ? Metadata.toJSON(e) : undefined - ); - } else { - obj.metadatas = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomsMetadataResponse { - const message = { - ...baseQueryDenomsMetadataResponse, - } as QueryDenomsMetadataResponse; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomMetadataRequest: object = { denom: "" }; - -export const QueryDenomMetadataRequest = { - encode( - message: QueryDenomMetadataRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomMetadataRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataRequest, - } as QueryDenomMetadataRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomMetadataRequest { - const message = { - ...baseQueryDenomMetadataRequest, - } as QueryDenomMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryDenomMetadataRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomMetadataRequest { - const message = { - ...baseQueryDenomMetadataRequest, - } as QueryDenomMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryDenomMetadataResponse: object = {}; - -export const QueryDenomMetadataResponse = { - encode( - message: QueryDenomMetadataResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomMetadataResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataResponse, - } as QueryDenomMetadataResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomMetadataResponse { - const message = { - ...baseQueryDenomMetadataResponse, - } as QueryDenomMetadataResponse; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromJSON(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, - - toJSON(message: QueryDenomMetadataResponse): unknown { - const obj: any = {}; - message.metadata !== undefined && - (obj.metadata = message.metadata - ? Metadata.toJSON(message.metadata) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomMetadataResponse { - const message = { - ...baseQueryDenomMetadataResponse, - } as QueryDenomMetadataResponse; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromPartial(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the balance of a single coin for a single account. */ - Balance(request: QueryBalanceRequest): Promise; - /** AllBalances queries the balance of all coins for a single account. */ - AllBalances( - request: QueryAllBalancesRequest - ): Promise; - /** TotalSupply queries the total supply of all coins. */ - TotalSupply( - request: QueryTotalSupplyRequest - ): Promise; - /** SupplyOf queries the supply of a single coin. */ - SupplyOf(request: QuerySupplyOfRequest): Promise; - /** Params queries the parameters of x/bank module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomsMetadata queries the client metadata of a given coin denomination. */ - DenomMetadata( - request: QueryDenomMetadataRequest - ): Promise; - /** DenomsMetadata queries the client metadata for all registered coin denominations. */ - DenomsMetadata( - request: QueryDenomsMetadataRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Balance(request: QueryBalanceRequest): Promise { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "Balance", - data - ); - return promise.then((data) => - QueryBalanceResponse.decode(new Reader(data)) - ); - } - - AllBalances( - request: QueryAllBalancesRequest - ): Promise { - const data = QueryAllBalancesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "AllBalances", - data - ); - return promise.then((data) => - QueryAllBalancesResponse.decode(new Reader(data)) - ); - } - - TotalSupply( - request: QueryTotalSupplyRequest - ): Promise { - const data = QueryTotalSupplyRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "TotalSupply", - data - ); - return promise.then((data) => - QueryTotalSupplyResponse.decode(new Reader(data)) - ); - } - - SupplyOf(request: QuerySupplyOfRequest): Promise { - const data = QuerySupplyOfRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "SupplyOf", - data - ); - return promise.then((data) => - QuerySupplyOfResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - DenomMetadata( - request: QueryDenomMetadataRequest - ): Promise { - const data = QueryDenomMetadataRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "DenomMetadata", - data - ); - return promise.then((data) => - QueryDenomMetadataResponse.decode(new Reader(data)) - ); - } - - DenomsMetadata( - request: QueryDenomsMetadataRequest - ): Promise { - const data = QueryDenomsMetadataRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "DenomsMetadata", - data - ); - return promise.then((data) => - QueryDenomsMetadataResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts deleted file mode 100644 index d6b67b5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Input, Output } from "../../../cosmos/bank/v1beta1/bank"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSend { - fromAddress: string; - toAddress: string; - amount: Coin[]; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse { -} -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSend { - inputs: Input[]; - outputs: Output[]; -} -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponse { -} -export declare const MsgSend: { - encode(message: MsgSend, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSend; - fromJSON(object: any): MsgSend; - toJSON(message: MsgSend): unknown; - fromPartial(object: DeepPartial): MsgSend; -}; -export declare const MsgSendResponse: { - encode(_: MsgSendResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSendResponse; - fromJSON(_: any): MsgSendResponse; - toJSON(_: MsgSendResponse): unknown; - fromPartial(_: DeepPartial): MsgSendResponse; -}; -export declare const MsgMultiSend: { - encode(message: MsgMultiSend, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMultiSend; - fromJSON(object: any): MsgMultiSend; - toJSON(message: MsgMultiSend): unknown; - fromPartial(object: DeepPartial): MsgMultiSend; -}; -export declare const MsgMultiSendResponse: { - encode(_: MsgMultiSendResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMultiSendResponse; - fromJSON(_: any): MsgMultiSendResponse; - toJSON(_: MsgMultiSendResponse): unknown; - fromPartial(_: DeepPartial): MsgMultiSendResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** Send defines a method for sending coins from one account to another account. */ - Send(request: MsgSend): Promise; - /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - MultiSend(request: MsgMultiSend): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Send(request: MsgSend): Promise; - MultiSend(request: MsgMultiSend): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js deleted file mode 100644 index c6f6acb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js +++ /dev/null @@ -1,262 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Input, Output } from "../../../cosmos/bank/v1beta1/bank"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseMsgSend = { fromAddress: "", toAddress: "" }; -export const MsgSend = { - encode(message, writer = Writer.create()) { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSend }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSend }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.fromAddress !== undefined && - (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSend }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgSendResponse = {}; -export const MsgSendResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSendResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgSendResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgSendResponse }; - return message; - }, -}; -const baseMsgMultiSend = {}; -export const MsgMultiSend = { - encode(message, writer = Writer.create()) { - for (const v of message.inputs) { - Input.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.outputs) { - Output.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSend }; - message.inputs = []; - message.outputs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inputs.push(Input.decode(reader, reader.uint32())); - break; - case 2: - message.outputs.push(Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgMultiSend }; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromJSON(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.inputs) { - obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined)); - } - else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map((e) => e ? Output.toJSON(e) : undefined); - } - else { - obj.outputs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgMultiSend }; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromPartial(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgMultiSendResponse = {}; -export const MsgMultiSendResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSendResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgMultiSendResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgMultiSendResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Send(request) { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data); - return promise.then((data) => MsgSendResponse.decode(new Reader(data))); - } - MultiSend(request) { - const data = MsgMultiSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "MultiSend", data); - return promise.then((data) => MsgMultiSendResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts deleted file mode 100644 index 7b3c53d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Input, Output } from "../../../cosmos/bank/v1beta1/bank"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSend { - fromAddress: string; - toAddress: string; - amount: Coin[]; -} - -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse {} - -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSend { - inputs: Input[]; - outputs: Output[]; -} - -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponse {} - -const baseMsgSend: object = { fromAddress: "", toAddress: "" }; - -export const MsgSend = { - encode(message: MsgSend, writer: Writer = Writer.create()): Writer { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSend { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSend } as MsgSend; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSend { - const message = { ...baseMsgSend } as MsgSend; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgSend): unknown { - const obj: any = {}; - message.fromAddress !== undefined && - (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgSend { - const message = { ...baseMsgSend } as MsgSend; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgSendResponse: object = {}; - -export const MsgSendResponse = { - encode(_: MsgSendResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSendResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSendResponse } as MsgSendResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgSendResponse { - const message = { ...baseMsgSendResponse } as MsgSendResponse; - return message; - }, - - toJSON(_: MsgSendResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgSendResponse { - const message = { ...baseMsgSendResponse } as MsgSendResponse; - return message; - }, -}; - -const baseMsgMultiSend: object = {}; - -export const MsgMultiSend = { - encode(message: MsgMultiSend, writer: Writer = Writer.create()): Writer { - for (const v of message.inputs) { - Input.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.outputs) { - Output.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMultiSend { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSend } as MsgMultiSend; - message.inputs = []; - message.outputs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inputs.push(Input.decode(reader, reader.uint32())); - break; - case 2: - message.outputs.push(Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMultiSend { - const message = { ...baseMsgMultiSend } as MsgMultiSend; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromJSON(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgMultiSend): unknown { - const obj: any = {}; - if (message.inputs) { - obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined)); - } else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map((e) => - e ? Output.toJSON(e) : undefined - ); - } else { - obj.outputs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgMultiSend { - const message = { ...baseMsgMultiSend } as MsgMultiSend; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromPartial(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgMultiSendResponse: object = {}; - -export const MsgMultiSendResponse = { - encode(_: MsgMultiSendResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMultiSendResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgMultiSendResponse { - const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse; - return message; - }, - - toJSON(_: MsgMultiSendResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgMultiSendResponse { - const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** Send defines a method for sending coins from one account to another account. */ - Send(request: MsgSend): Promise; - /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - MultiSend(request: MsgMultiSend): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Send(request: MsgSend): Promise { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data); - return promise.then((data) => MsgSendResponse.decode(new Reader(data))); - } - - MultiSend(request: MsgMultiSend): Promise { - const data = MsgMultiSend.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Msg", - "MultiSend", - data - ); - return promise.then((data) => - MsgMultiSendResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.d.ts deleted file mode 100644 index 56e2ce8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -declare const _default: { - namespaced: boolean; - state: { - _Structure: { - TxResponse: { - fields: any[]; - }; - ABCIMessageLog: { - fields: any[]; - }; - StringEvent: { - fields: any[]; - }; - Attribute: { - fields: any[]; - }; - GasInfo: { - fields: any[]; - }; - Result: { - fields: any[]; - }; - SimulationResponse: { - fields: any[]; - }; - MsgData: { - fields: any[]; - }; - TxMsgData: { - fields: any[]; - }; - SearchTxsResult: { - fields: any[]; - }; - }; - _Subscriptions: Set; - }; - mutations: { - RESET_STATE(state: any): void; - QUERY(state: any, { query, key, value }: { - query: any; - key: any; - value: any; - }): void; - SUBSCRIBE(state: any, subscription: any): void; - UNSUBSCRIBE(state: any, subscription: any): void; - }; - getters: { - getTypeStructure: (state: any) => (type: any) => any; - }; - actions: { - init({ dispatch, rootGetters }: { - dispatch: any; - rootGetters: any; - }): void; - resetState({ commit }: { - commit: any; - }): void; - unsubscribe({ commit }: { - commit: any; - }, subscription: any): void; - StoreUpdate({ state, dispatch }: { - state: any; - dispatch: any; - }): Promise; - }; -}; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.js deleted file mode 100644 index 9faf076..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.js +++ /dev/null @@ -1,94 +0,0 @@ -import { txClient, queryClient } from './module'; -import { TxResponse } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { ABCIMessageLog } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { StringEvent } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { Attribute } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { GasInfo } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { Result } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { SimulationResponse } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { MsgData } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { TxMsgData } from "./module/types/cosmos/base/abci/v1beta1/abci"; -import { SearchTxsResult } from "./module/types/cosmos/base/abci/v1beta1/abci"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: { - TxResponse: getStructure(TxResponse.fromPartial({})), - ABCIMessageLog: getStructure(ABCIMessageLog.fromPartial({})), - StringEvent: getStructure(StringEvent.fromPartial({})), - Attribute: getStructure(Attribute.fromPartial({})), - GasInfo: getStructure(GasInfo.fromPartial({})), - Result: getStructure(Result.fromPartial({})), - SimulationResponse: getStructure(SimulationResponse.fromPartial({})), - MsgData: getStructure(MsgData.fromPartial({})), - TxMsgData: getStructure(TxMsgData.fromPartial({})), - SearchTxsResult: getStructure(SearchTxsResult.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.ts deleted file mode 100644 index 54bdd89..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/index.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { TxResponse } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { ABCIMessageLog } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { StringEvent } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { Attribute } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { GasInfo } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { Result } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { SimulationResponse } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { MsgData } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { TxMsgData } from "./module/types/cosmos/base/abci/v1beta1/abci" -import { SearchTxsResult } from "./module/types/cosmos/base/abci/v1beta1/abci" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - TxResponse: getStructure(TxResponse.fromPartial({})), - ABCIMessageLog: getStructure(ABCIMessageLog.fromPartial({})), - StringEvent: getStructure(StringEvent.fromPartial({})), - Attribute: getStructure(Attribute.fromPartial({})), - GasInfo: getStructure(GasInfo.fromPartial({})), - Result: getStructure(Result.fromPartial({})), - SimulationResponse: getStructure(SimulationResponse.fromPartial({})), - MsgData: getStructure(MsgData.fromPartial({})), - TxMsgData: getStructure(TxMsgData.fromPartial({})), - SearchTxsResult: getStructure(SearchTxsResult.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.d.ts deleted file mode 100644 index 202ebae..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.js deleted file mode 100644 index 15dfd12..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.js +++ /dev/null @@ -1,23 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -const types = []; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.ts deleted file mode 100644 index 2bbbd28..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.d.ts deleted file mode 100644 index ca0fc0b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/base/abci/v1beta1/abci.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.js deleted file mode 100644 index 7f16175..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/base/abci/v1beta1/abci.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.ts deleted file mode 100644 index 8e96417..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/rest.ts +++ /dev/null @@ -1,334 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/base/abci/v1beta1/abci.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts deleted file mode 100644 index 0007687..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; -export declare const protobufPackage = "cosmos.base.abci.v1beta1"; -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: number; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - rawLog: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gasWanted: number; - /** Amount of gas consumed by transaction. */ - gasUsed: number; - /** The request transaction bytes. */ - tx: Any | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; -} -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msgIndex: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gasWanted: number; - /** GasUsed is the amount of gas actually consumed. */ - gasUsed: number; -} -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; -} -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gasInfo: GasInfo | undefined; - result: Result | undefined; -} -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -export interface MsgData { - msgType: string; - data: Uint8Array; -} -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - data: MsgData[]; -} -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - totalCount: number; - /** Count of txs in current page */ - count: number; - /** Index of current page, start from 1 */ - pageNumber: number; - /** Count of total pages */ - pageTotal: number; - /** Max count txs per page */ - limit: number; - /** List of txs in current page */ - txs: TxResponse[]; -} -export declare const TxResponse: { - encode(message: TxResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxResponse; - fromJSON(object: any): TxResponse; - toJSON(message: TxResponse): unknown; - fromPartial(object: DeepPartial): TxResponse; -}; -export declare const ABCIMessageLog: { - encode(message: ABCIMessageLog, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ABCIMessageLog; - fromJSON(object: any): ABCIMessageLog; - toJSON(message: ABCIMessageLog): unknown; - fromPartial(object: DeepPartial): ABCIMessageLog; -}; -export declare const StringEvent: { - encode(message: StringEvent, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): StringEvent; - fromJSON(object: any): StringEvent; - toJSON(message: StringEvent): unknown; - fromPartial(object: DeepPartial): StringEvent; -}; -export declare const Attribute: { - encode(message: Attribute, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Attribute; - fromJSON(object: any): Attribute; - toJSON(message: Attribute): unknown; - fromPartial(object: DeepPartial): Attribute; -}; -export declare const GasInfo: { - encode(message: GasInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GasInfo; - fromJSON(object: any): GasInfo; - toJSON(message: GasInfo): unknown; - fromPartial(object: DeepPartial): GasInfo; -}; -export declare const Result: { - encode(message: Result, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Result; - fromJSON(object: any): Result; - toJSON(message: Result): unknown; - fromPartial(object: DeepPartial): Result; -}; -export declare const SimulationResponse: { - encode(message: SimulationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SimulationResponse; - fromJSON(object: any): SimulationResponse; - toJSON(message: SimulationResponse): unknown; - fromPartial(object: DeepPartial): SimulationResponse; -}; -export declare const MsgData: { - encode(message: MsgData, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgData; - fromJSON(object: any): MsgData; - toJSON(message: MsgData): unknown; - fromPartial(object: DeepPartial): MsgData; -}; -export declare const TxMsgData: { - encode(message: TxMsgData, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxMsgData; - fromJSON(object: any): TxMsgData; - toJSON(message: TxMsgData): unknown; - fromPartial(object: DeepPartial): TxMsgData; -}; -export declare const SearchTxsResult: { - encode(message: SearchTxsResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SearchTxsResult; - fromJSON(object: any): SearchTxsResult; - toJSON(message: SearchTxsResult): unknown; - fromPartial(object: DeepPartial): SearchTxsResult; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js deleted file mode 100644 index 0c234e9..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js +++ /dev/null @@ -1,1085 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; -export const protobufPackage = "cosmos.base.abci.v1beta1"; -const baseTxResponse = { - height: 0, - txhash: "", - codespace: "", - code: 0, - data: "", - rawLog: "", - info: "", - gasWanted: 0, - gasUsed: 0, - timestamp: "", -}; -export const TxResponse = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.rawLog !== "") { - writer.uint32(50).string(message.rawLog); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(72).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(80).int64(message.gasUsed); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResponse }; - message.logs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = longToNumber(reader.int64()); - break; - case 10: - message.gasUsed = longToNumber(reader.int64()); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxResponse }; - message.logs = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = String(object.txhash); - } - else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } - else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = String(object.rawLog); - } - else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromJSON(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromJSON(object.tx); - } - else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = String(object.timestamp); - } - else { - message.timestamp = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.txhash !== undefined && (obj.txhash = message.txhash); - message.codespace !== undefined && (obj.codespace = message.codespace); - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && (obj.data = message.data); - message.rawLog !== undefined && (obj.rawLog = message.rawLog); - if (message.logs) { - obj.logs = message.logs.map((e) => e ? ABCIMessageLog.toJSON(e) : undefined); - } - else { - obj.logs = []; - } - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - message.tx !== undefined && - (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxResponse }; - message.logs = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = object.txhash; - } - else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = object.rawLog; - } - else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromPartial(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromPartial(object.tx); - } - else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = ""; - } - return message; - }, -}; -const baseABCIMessageLog = { msgIndex: 0, log: "" }; -export const ABCIMessageLog = { - encode(message, writer = Writer.create()) { - if (message.msgIndex !== 0) { - writer.uint32(8).uint32(message.msgIndex); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseABCIMessageLog }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseABCIMessageLog }; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = Number(object.msgIndex); - } - else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msgIndex !== undefined && (obj.msgIndex = message.msgIndex); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => e ? StringEvent.toJSON(e) : undefined); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseABCIMessageLog }; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = object.msgIndex; - } - else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromPartial(e)); - } - } - return message; - }, -}; -const baseStringEvent = { type: "" }; -export const StringEvent = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStringEvent }; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseStringEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => e ? Attribute.toJSON(e) : undefined); - } - else { - obj.attributes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseStringEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromPartial(e)); - } - } - return message; - }, -}; -const baseAttribute = { key: "", value: "" }; -export const Attribute = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAttribute }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } - else { - message.value = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object) { - const message = { ...baseAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = ""; - } - return message; - }, -}; -const baseGasInfo = { gasWanted: 0, gasUsed: 0 }; -export const GasInfo = { - encode(message, writer = Writer.create()) { - if (message.gasWanted !== 0) { - writer.uint32(8).uint64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(16).uint64(message.gasUsed); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGasInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = longToNumber(reader.uint64()); - break; - case 2: - message.gasUsed = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGasInfo }; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - return obj; - }, - fromPartial(object) { - const message = { ...baseGasInfo }; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - return message; - }, -}; -const baseResult = { log: "" }; -export const Result = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResult }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResult }; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResult }; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseSimulationResponse = {}; -export const SimulationResponse = { - encode(message, writer = Writer.create()) { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulationResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSimulationResponse }; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromJSON(object.gasInfo); - } - else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromJSON(object.result); - } - else { - message.result = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.gasInfo !== undefined && - (obj.gasInfo = message.gasInfo - ? GasInfo.toJSON(message.gasInfo) - : undefined); - message.result !== undefined && - (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSimulationResponse }; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromPartial(object.gasInfo); - } - else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromPartial(object.result); - } - else { - message.result = undefined; - } - return message; - }, -}; -const baseMsgData = { msgType: "" }; -export const MsgData = { - encode(message, writer = Writer.create()) { - if (message.msgType !== "") { - writer.uint32(10).string(message.msgType); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgData }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgData }; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = String(object.msgType); - } - else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msgType !== undefined && (obj.msgType = message.msgType); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgData }; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = object.msgType; - } - else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseTxMsgData = {}; -export const TxMsgData = { - encode(message, writer = Writer.create()) { - for (const v of message.data) { - MsgData.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxMsgData }; - message.data = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxMsgData }; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.data) { - obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined)); - } - else { - obj.data = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseTxMsgData }; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromPartial(e)); - } - } - return message; - }, -}; -const baseSearchTxsResult = { - totalCount: 0, - count: 0, - pageNumber: 0, - pageTotal: 0, - limit: 0, -}; -export const SearchTxsResult = { - encode(message, writer = Writer.create()) { - if (message.totalCount !== 0) { - writer.uint32(8).uint64(message.totalCount); - } - if (message.count !== 0) { - writer.uint32(16).uint64(message.count); - } - if (message.pageNumber !== 0) { - writer.uint32(24).uint64(message.pageNumber); - } - if (message.pageTotal !== 0) { - writer.uint32(32).uint64(message.pageTotal); - } - if (message.limit !== 0) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSearchTxsResult }; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = longToNumber(reader.uint64()); - break; - case 2: - message.count = longToNumber(reader.uint64()); - break; - case 3: - message.pageNumber = longToNumber(reader.uint64()); - break; - case 4: - message.pageTotal = longToNumber(reader.uint64()); - break; - case 5: - message.limit = longToNumber(reader.uint64()); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSearchTxsResult }; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = Number(object.totalCount); - } - else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = Number(object.count); - } - else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = Number(object.pageNumber); - } - else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = Number(object.pageTotal); - } - else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.totalCount !== undefined && (obj.totalCount = message.totalCount); - message.count !== undefined && (obj.count = message.count); - message.pageNumber !== undefined && (obj.pageNumber = message.pageNumber); - message.pageTotal !== undefined && (obj.pageTotal = message.pageTotal); - message.limit !== undefined && (obj.limit = message.limit); - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined)); - } - else { - obj.txs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSearchTxsResult }; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = object.totalCount; - } - else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = object.count; - } - else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = object.pageNumber; - } - else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = object.pageTotal; - } - else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts deleted file mode 100644 index ba37393..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts +++ /dev/null @@ -1,1246 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; - -export const protobufPackage = "cosmos.base.abci.v1beta1"; - -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: number; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - rawLog: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gasWanted: number; - /** Amount of gas consumed by transaction. */ - gasUsed: number; - /** The request transaction bytes. */ - tx: Any | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; -} - -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msgIndex: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} - -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} - -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} - -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gasWanted: number; - /** GasUsed is the amount of gas actually consumed. */ - gasUsed: number; -} - -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; -} - -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gasInfo: GasInfo | undefined; - result: Result | undefined; -} - -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -export interface MsgData { - msgType: string; - data: Uint8Array; -} - -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - data: MsgData[]; -} - -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - totalCount: number; - /** Count of txs in current page */ - count: number; - /** Index of current page, start from 1 */ - pageNumber: number; - /** Count of total pages */ - pageTotal: number; - /** Max count txs per page */ - limit: number; - /** List of txs in current page */ - txs: TxResponse[]; -} - -const baseTxResponse: object = { - height: 0, - txhash: "", - codespace: "", - code: 0, - data: "", - rawLog: "", - info: "", - gasWanted: 0, - gasUsed: 0, - timestamp: "", -}; - -export const TxResponse = { - encode(message: TxResponse, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.rawLog !== "") { - writer.uint32(50).string(message.rawLog); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(72).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(80).int64(message.gasUsed); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = longToNumber(reader.int64() as Long); - break; - case 10: - message.gasUsed = longToNumber(reader.int64() as Long); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxResponse { - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = String(object.txhash); - } else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = String(object.rawLog); - } else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromJSON(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromJSON(object.tx); - } else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = String(object.timestamp); - } else { - message.timestamp = ""; - } - return message; - }, - - toJSON(message: TxResponse): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.txhash !== undefined && (obj.txhash = message.txhash); - message.codespace !== undefined && (obj.codespace = message.codespace); - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && (obj.data = message.data); - message.rawLog !== undefined && (obj.rawLog = message.rawLog); - if (message.logs) { - obj.logs = message.logs.map((e) => - e ? ABCIMessageLog.toJSON(e) : undefined - ); - } else { - obj.logs = []; - } - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - message.tx !== undefined && - (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - return obj; - }, - - fromPartial(object: DeepPartial): TxResponse { - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = object.txhash; - } else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = object.rawLog; - } else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromPartial(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromPartial(object.tx); - } else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = ""; - } - return message; - }, -}; - -const baseABCIMessageLog: object = { msgIndex: 0, log: "" }; - -export const ABCIMessageLog = { - encode(message: ABCIMessageLog, writer: Writer = Writer.create()): Writer { - if (message.msgIndex !== 0) { - writer.uint32(8).uint32(message.msgIndex); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ABCIMessageLog { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ABCIMessageLog { - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = Number(object.msgIndex); - } else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ABCIMessageLog): unknown { - const obj: any = {}; - message.msgIndex !== undefined && (obj.msgIndex = message.msgIndex); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => - e ? StringEvent.toJSON(e) : undefined - ); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ABCIMessageLog { - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = object.msgIndex; - } else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromPartial(e)); - } - } - return message; - }, -}; - -const baseStringEvent: object = { type: "" }; - -export const StringEvent = { - encode(message: StringEvent, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): StringEvent { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StringEvent { - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: StringEvent): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); - } else { - obj.attributes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): StringEvent { - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromPartial(e)); - } - } - return message; - }, -}; - -const baseAttribute: object = { key: "", value: "" }; - -export const Attribute = { - encode(message: Attribute, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Attribute { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAttribute } as Attribute; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Attribute { - const message = { ...baseAttribute } as Attribute; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: Attribute): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): Attribute { - const message = { ...baseAttribute } as Attribute; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -const baseGasInfo: object = { gasWanted: 0, gasUsed: 0 }; - -export const GasInfo = { - encode(message: GasInfo, writer: Writer = Writer.create()): Writer { - if (message.gasWanted !== 0) { - writer.uint32(8).uint64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(16).uint64(message.gasUsed); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GasInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGasInfo } as GasInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = longToNumber(reader.uint64() as Long); - break; - case 2: - message.gasUsed = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GasInfo { - const message = { ...baseGasInfo } as GasInfo; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - return message; - }, - - toJSON(message: GasInfo): unknown { - const obj: any = {}; - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - return obj; - }, - - fromPartial(object: DeepPartial): GasInfo { - const message = { ...baseGasInfo } as GasInfo; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - return message; - }, -}; - -const baseResult: object = { log: "" }; - -export const Result = { - encode(message: Result, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Result { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResult } as Result; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Result { - const message = { ...baseResult } as Result; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Result): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Result { - const message = { ...baseResult } as Result; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSimulationResponse: object = {}; - -export const SimulationResponse = { - encode( - message: SimulationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimulationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulationResponse } as SimulationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimulationResponse { - const message = { ...baseSimulationResponse } as SimulationResponse; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromJSON(object.gasInfo); - } else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: SimulationResponse): unknown { - const obj: any = {}; - message.gasInfo !== undefined && - (obj.gasInfo = message.gasInfo - ? GasInfo.toJSON(message.gasInfo) - : undefined); - message.result !== undefined && - (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SimulationResponse { - const message = { ...baseSimulationResponse } as SimulationResponse; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromPartial(object.gasInfo); - } else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseMsgData: object = { msgType: "" }; - -export const MsgData = { - encode(message: MsgData, writer: Writer = Writer.create()): Writer { - if (message.msgType !== "") { - writer.uint32(10).string(message.msgType); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgData } as MsgData; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgData { - const message = { ...baseMsgData } as MsgData; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = String(object.msgType); - } else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgData): unknown { - const obj: any = {}; - message.msgType !== undefined && (obj.msgType = message.msgType); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MsgData { - const message = { ...baseMsgData } as MsgData; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = object.msgType; - } else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseTxMsgData: object = {}; - -export const TxMsgData = { - encode(message: TxMsgData, writer: Writer = Writer.create()): Writer { - for (const v of message.data) { - MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxMsgData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxMsgData { - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: TxMsgData): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined)); - } else { - obj.data = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxMsgData { - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSearchTxsResult: object = { - totalCount: 0, - count: 0, - pageNumber: 0, - pageTotal: 0, - limit: 0, -}; - -export const SearchTxsResult = { - encode(message: SearchTxsResult, writer: Writer = Writer.create()): Writer { - if (message.totalCount !== 0) { - writer.uint32(8).uint64(message.totalCount); - } - if (message.count !== 0) { - writer.uint32(16).uint64(message.count); - } - if (message.pageNumber !== 0) { - writer.uint32(24).uint64(message.pageNumber); - } - if (message.pageTotal !== 0) { - writer.uint32(32).uint64(message.pageTotal); - } - if (message.limit !== 0) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SearchTxsResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = longToNumber(reader.uint64() as Long); - break; - case 2: - message.count = longToNumber(reader.uint64() as Long); - break; - case 3: - message.pageNumber = longToNumber(reader.uint64() as Long); - break; - case 4: - message.pageTotal = longToNumber(reader.uint64() as Long); - break; - case 5: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SearchTxsResult { - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = Number(object.totalCount); - } else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = Number(object.count); - } else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = Number(object.pageNumber); - } else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = Number(object.pageTotal); - } else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SearchTxsResult): unknown { - const obj: any = {}; - message.totalCount !== undefined && (obj.totalCount = message.totalCount); - message.count !== undefined && (obj.count = message.count); - message.pageNumber !== undefined && (obj.pageNumber = message.pageNumber); - message.pageTotal !== undefined && (obj.pageTotal = message.pageTotal); - message.limit !== undefined && (obj.limit = message.limit); - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SearchTxsResult { - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = object.totalCount; - } else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = object.count; - } else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = object.pageNumber; - } else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = object.pageTotal; - } else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index b586045..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556fa..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index f67058a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 82af3da..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 52a7265..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.d.ts deleted file mode 100644 index 7e37d4f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.d.ts +++ /dev/null @@ -1,697 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { EvidenceParams, ValidatorParams, VersionParams } from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export declare const protobufPackage = "tendermint.abci"; -export declare enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1 -} -export declare function checkTxTypeFromJSON(object: any): CheckTxType; -export declare function checkTxTypeToJSON(object: CheckTxType): string; -export declare enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1 -} -export declare function evidenceTypeFromJSON(object: any): EvidenceType; -export declare function evidenceTypeToJSON(object: EvidenceType): string; -export interface Request { - echo: RequestEcho | undefined; - flush: RequestFlush | undefined; - info: RequestInfo | undefined; - setOption: RequestSetOption | undefined; - initChain: RequestInitChain | undefined; - query: RequestQuery | undefined; - beginBlock: RequestBeginBlock | undefined; - checkTx: RequestCheckTx | undefined; - deliverTx: RequestDeliverTx | undefined; - endBlock: RequestEndBlock | undefined; - commit: RequestCommit | undefined; - listSnapshots: RequestListSnapshots | undefined; - offerSnapshot: RequestOfferSnapshot | undefined; - loadSnapshotChunk: RequestLoadSnapshotChunk | undefined; - applySnapshotChunk: RequestApplySnapshotChunk | undefined; -} -export interface RequestEcho { - message: string; -} -export interface RequestFlush { -} -export interface RequestInfo { - version: string; - blockVersion: number; - p2pVersion: number; -} -/** nondeterministic */ -export interface RequestSetOption { - key: string; - value: string; -} -export interface RequestInitChain { - time: Date | undefined; - chainId: string; - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appStateBytes: Uint8Array; - initialHeight: number; -} -export interface RequestQuery { - data: Uint8Array; - path: string; - height: number; - prove: boolean; -} -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header | undefined; - lastCommitInfo: LastCommitInfo | undefined; - byzantineValidators: Evidence[]; -} -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} -export interface RequestDeliverTx { - tx: Uint8Array; -} -export interface RequestEndBlock { - height: number; -} -export interface RequestCommit { -} -/** lists available snapshots */ -export interface RequestListSnapshots { -} -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot: Snapshot | undefined; - /** light client-verified app hash for snapshot height */ - appHash: Uint8Array; -} -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: number; - format: number; - chunk: number; -} -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} -export interface Response { - exception: ResponseException | undefined; - echo: ResponseEcho | undefined; - flush: ResponseFlush | undefined; - info: ResponseInfo | undefined; - setOption: ResponseSetOption | undefined; - initChain: ResponseInitChain | undefined; - query: ResponseQuery | undefined; - beginBlock: ResponseBeginBlock | undefined; - checkTx: ResponseCheckTx | undefined; - deliverTx: ResponseDeliverTx | undefined; - endBlock: ResponseEndBlock | undefined; - commit: ResponseCommit | undefined; - listSnapshots: ResponseListSnapshots | undefined; - offerSnapshot: ResponseOfferSnapshot | undefined; - loadSnapshotChunk: ResponseLoadSnapshotChunk | undefined; - applySnapshotChunk: ResponseApplySnapshotChunk | undefined; -} -/** nondeterministic */ -export interface ResponseException { - error: string; -} -export interface ResponseEcho { - message: string; -} -export interface ResponseFlush { -} -export interface ResponseInfo { - data: string; - version: string; - appVersion: number; - lastBlockHeight: number; - lastBlockAppHash: Uint8Array; -} -/** nondeterministic */ -export interface ResponseSetOption { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} -export interface ResponseInitChain { - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appHash: Uint8Array; -} -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: number; - key: Uint8Array; - value: Uint8Array; - proofOps: ProofOps | undefined; - height: number; - codespace: string; -} -export interface ResponseBeginBlock { - events: Event[]; -} -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} -export interface ResponseEndBlock { - validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates: ConsensusParams | undefined; - events: Event[]; -} -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retainHeight: number; -} -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} -export declare enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1 -} -export declare function responseOfferSnapshot_ResultFromJSON(object: any): ResponseOfferSnapshot_Result; -export declare function responseOfferSnapshot_ResultToJSON(object: ResponseOfferSnapshot_Result): string; -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetchChunks: number[]; - /** Chunk senders to reject and ban */ - rejectSenders: string[]; -} -export declare enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1 -} -export declare function responseApplySnapshotChunk_ResultFromJSON(object: any): ResponseApplySnapshotChunk_Result; -export declare function responseApplySnapshotChunk_ResultToJSON(object: ResponseApplySnapshotChunk_Result): string; -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** Note: must be greater than 0 */ - maxBytes: number; - /** Note: must be greater or equal to -1 */ - maxGas: number; -} -export interface LastCommitInfo { - round: number; - votes: VoteInfo[]; -} -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: number; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx | undefined; -} -/** Validator */ -export interface Validator { - /** The first 20 bytes of SHA256(public key) */ - address: Uint8Array; - /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ - power: number; -} -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pubKey: PublicKey | undefined; - power: number; -} -/** VoteInfo */ -export interface VoteInfo { - validator: Validator | undefined; - signedLastBlock: boolean; -} -export interface Evidence { - type: EvidenceType; - /** The offending validator */ - validator: Validator | undefined; - /** The height when the offense occurred */ - height: number; - /** The corresponding time where the offense occurred */ - time: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - totalVotingPower: number; -} -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: number; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} -export declare const Request: { - encode(message: Request, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Request; - fromJSON(object: any): Request; - toJSON(message: Request): unknown; - fromPartial(object: DeepPartial): Request; -}; -export declare const RequestEcho: { - encode(message: RequestEcho, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestEcho; - fromJSON(object: any): RequestEcho; - toJSON(message: RequestEcho): unknown; - fromPartial(object: DeepPartial): RequestEcho; -}; -export declare const RequestFlush: { - encode(_: RequestFlush, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestFlush; - fromJSON(_: any): RequestFlush; - toJSON(_: RequestFlush): unknown; - fromPartial(_: DeepPartial): RequestFlush; -}; -export declare const RequestInfo: { - encode(message: RequestInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestInfo; - fromJSON(object: any): RequestInfo; - toJSON(message: RequestInfo): unknown; - fromPartial(object: DeepPartial): RequestInfo; -}; -export declare const RequestSetOption: { - encode(message: RequestSetOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestSetOption; - fromJSON(object: any): RequestSetOption; - toJSON(message: RequestSetOption): unknown; - fromPartial(object: DeepPartial): RequestSetOption; -}; -export declare const RequestInitChain: { - encode(message: RequestInitChain, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestInitChain; - fromJSON(object: any): RequestInitChain; - toJSON(message: RequestInitChain): unknown; - fromPartial(object: DeepPartial): RequestInitChain; -}; -export declare const RequestQuery: { - encode(message: RequestQuery, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestQuery; - fromJSON(object: any): RequestQuery; - toJSON(message: RequestQuery): unknown; - fromPartial(object: DeepPartial): RequestQuery; -}; -export declare const RequestBeginBlock: { - encode(message: RequestBeginBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestBeginBlock; - fromJSON(object: any): RequestBeginBlock; - toJSON(message: RequestBeginBlock): unknown; - fromPartial(object: DeepPartial): RequestBeginBlock; -}; -export declare const RequestCheckTx: { - encode(message: RequestCheckTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestCheckTx; - fromJSON(object: any): RequestCheckTx; - toJSON(message: RequestCheckTx): unknown; - fromPartial(object: DeepPartial): RequestCheckTx; -}; -export declare const RequestDeliverTx: { - encode(message: RequestDeliverTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestDeliverTx; - fromJSON(object: any): RequestDeliverTx; - toJSON(message: RequestDeliverTx): unknown; - fromPartial(object: DeepPartial): RequestDeliverTx; -}; -export declare const RequestEndBlock: { - encode(message: RequestEndBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestEndBlock; - fromJSON(object: any): RequestEndBlock; - toJSON(message: RequestEndBlock): unknown; - fromPartial(object: DeepPartial): RequestEndBlock; -}; -export declare const RequestCommit: { - encode(_: RequestCommit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestCommit; - fromJSON(_: any): RequestCommit; - toJSON(_: RequestCommit): unknown; - fromPartial(_: DeepPartial): RequestCommit; -}; -export declare const RequestListSnapshots: { - encode(_: RequestListSnapshots, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestListSnapshots; - fromJSON(_: any): RequestListSnapshots; - toJSON(_: RequestListSnapshots): unknown; - fromPartial(_: DeepPartial): RequestListSnapshots; -}; -export declare const RequestOfferSnapshot: { - encode(message: RequestOfferSnapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestOfferSnapshot; - fromJSON(object: any): RequestOfferSnapshot; - toJSON(message: RequestOfferSnapshot): unknown; - fromPartial(object: DeepPartial): RequestOfferSnapshot; -}; -export declare const RequestLoadSnapshotChunk: { - encode(message: RequestLoadSnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestLoadSnapshotChunk; - fromJSON(object: any): RequestLoadSnapshotChunk; - toJSON(message: RequestLoadSnapshotChunk): unknown; - fromPartial(object: DeepPartial): RequestLoadSnapshotChunk; -}; -export declare const RequestApplySnapshotChunk: { - encode(message: RequestApplySnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestApplySnapshotChunk; - fromJSON(object: any): RequestApplySnapshotChunk; - toJSON(message: RequestApplySnapshotChunk): unknown; - fromPartial(object: DeepPartial): RequestApplySnapshotChunk; -}; -export declare const Response: { - encode(message: Response, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Response; - fromJSON(object: any): Response; - toJSON(message: Response): unknown; - fromPartial(object: DeepPartial): Response; -}; -export declare const ResponseException: { - encode(message: ResponseException, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseException; - fromJSON(object: any): ResponseException; - toJSON(message: ResponseException): unknown; - fromPartial(object: DeepPartial): ResponseException; -}; -export declare const ResponseEcho: { - encode(message: ResponseEcho, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseEcho; - fromJSON(object: any): ResponseEcho; - toJSON(message: ResponseEcho): unknown; - fromPartial(object: DeepPartial): ResponseEcho; -}; -export declare const ResponseFlush: { - encode(_: ResponseFlush, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseFlush; - fromJSON(_: any): ResponseFlush; - toJSON(_: ResponseFlush): unknown; - fromPartial(_: DeepPartial): ResponseFlush; -}; -export declare const ResponseInfo: { - encode(message: ResponseInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseInfo; - fromJSON(object: any): ResponseInfo; - toJSON(message: ResponseInfo): unknown; - fromPartial(object: DeepPartial): ResponseInfo; -}; -export declare const ResponseSetOption: { - encode(message: ResponseSetOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseSetOption; - fromJSON(object: any): ResponseSetOption; - toJSON(message: ResponseSetOption): unknown; - fromPartial(object: DeepPartial): ResponseSetOption; -}; -export declare const ResponseInitChain: { - encode(message: ResponseInitChain, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseInitChain; - fromJSON(object: any): ResponseInitChain; - toJSON(message: ResponseInitChain): unknown; - fromPartial(object: DeepPartial): ResponseInitChain; -}; -export declare const ResponseQuery: { - encode(message: ResponseQuery, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseQuery; - fromJSON(object: any): ResponseQuery; - toJSON(message: ResponseQuery): unknown; - fromPartial(object: DeepPartial): ResponseQuery; -}; -export declare const ResponseBeginBlock: { - encode(message: ResponseBeginBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseBeginBlock; - fromJSON(object: any): ResponseBeginBlock; - toJSON(message: ResponseBeginBlock): unknown; - fromPartial(object: DeepPartial): ResponseBeginBlock; -}; -export declare const ResponseCheckTx: { - encode(message: ResponseCheckTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseCheckTx; - fromJSON(object: any): ResponseCheckTx; - toJSON(message: ResponseCheckTx): unknown; - fromPartial(object: DeepPartial): ResponseCheckTx; -}; -export declare const ResponseDeliverTx: { - encode(message: ResponseDeliverTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseDeliverTx; - fromJSON(object: any): ResponseDeliverTx; - toJSON(message: ResponseDeliverTx): unknown; - fromPartial(object: DeepPartial): ResponseDeliverTx; -}; -export declare const ResponseEndBlock: { - encode(message: ResponseEndBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseEndBlock; - fromJSON(object: any): ResponseEndBlock; - toJSON(message: ResponseEndBlock): unknown; - fromPartial(object: DeepPartial): ResponseEndBlock; -}; -export declare const ResponseCommit: { - encode(message: ResponseCommit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseCommit; - fromJSON(object: any): ResponseCommit; - toJSON(message: ResponseCommit): unknown; - fromPartial(object: DeepPartial): ResponseCommit; -}; -export declare const ResponseListSnapshots: { - encode(message: ResponseListSnapshots, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseListSnapshots; - fromJSON(object: any): ResponseListSnapshots; - toJSON(message: ResponseListSnapshots): unknown; - fromPartial(object: DeepPartial): ResponseListSnapshots; -}; -export declare const ResponseOfferSnapshot: { - encode(message: ResponseOfferSnapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseOfferSnapshot; - fromJSON(object: any): ResponseOfferSnapshot; - toJSON(message: ResponseOfferSnapshot): unknown; - fromPartial(object: DeepPartial): ResponseOfferSnapshot; -}; -export declare const ResponseLoadSnapshotChunk: { - encode(message: ResponseLoadSnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseLoadSnapshotChunk; - fromJSON(object: any): ResponseLoadSnapshotChunk; - toJSON(message: ResponseLoadSnapshotChunk): unknown; - fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk; -}; -export declare const ResponseApplySnapshotChunk: { - encode(message: ResponseApplySnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseApplySnapshotChunk; - fromJSON(object: any): ResponseApplySnapshotChunk; - toJSON(message: ResponseApplySnapshotChunk): unknown; - fromPartial(object: DeepPartial): ResponseApplySnapshotChunk; -}; -export declare const ConsensusParams: { - encode(message: ConsensusParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusParams; - fromJSON(object: any): ConsensusParams; - toJSON(message: ConsensusParams): unknown; - fromPartial(object: DeepPartial): ConsensusParams; -}; -export declare const BlockParams: { - encode(message: BlockParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockParams; - fromJSON(object: any): BlockParams; - toJSON(message: BlockParams): unknown; - fromPartial(object: DeepPartial): BlockParams; -}; -export declare const LastCommitInfo: { - encode(message: LastCommitInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LastCommitInfo; - fromJSON(object: any): LastCommitInfo; - toJSON(message: LastCommitInfo): unknown; - fromPartial(object: DeepPartial): LastCommitInfo; -}; -export declare const Event: { - encode(message: Event, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Event; - fromJSON(object: any): Event; - toJSON(message: Event): unknown; - fromPartial(object: DeepPartial): Event; -}; -export declare const EventAttribute: { - encode(message: EventAttribute, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EventAttribute; - fromJSON(object: any): EventAttribute; - toJSON(message: EventAttribute): unknown; - fromPartial(object: DeepPartial): EventAttribute; -}; -export declare const TxResult: { - encode(message: TxResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxResult; - fromJSON(object: any): TxResult; - toJSON(message: TxResult): unknown; - fromPartial(object: DeepPartial): TxResult; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const ValidatorUpdate: { - encode(message: ValidatorUpdate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorUpdate; - fromJSON(object: any): ValidatorUpdate; - toJSON(message: ValidatorUpdate): unknown; - fromPartial(object: DeepPartial): ValidatorUpdate; -}; -export declare const VoteInfo: { - encode(message: VoteInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VoteInfo; - fromJSON(object: any): VoteInfo; - toJSON(message: VoteInfo): unknown; - fromPartial(object: DeepPartial): VoteInfo; -}; -export declare const Evidence: { - encode(message: Evidence, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Evidence; - fromJSON(object: any): Evidence; - toJSON(message: Evidence): unknown; - fromPartial(object: DeepPartial): Evidence; -}; -export declare const Snapshot: { - encode(message: Snapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Snapshot; - fromJSON(object: any): Snapshot; - toJSON(message: Snapshot): unknown; - fromPartial(object: DeepPartial): Snapshot; -}; -export interface ABCIApplication { - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk(request: RequestLoadSnapshotChunk): Promise; - ApplySnapshotChunk(request: RequestApplySnapshotChunk): Promise; -} -export declare class ABCIApplicationClientImpl implements ABCIApplication { - private readonly rpc; - constructor(rpc: Rpc); - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk(request: RequestLoadSnapshotChunk): Promise; - ApplySnapshotChunk(request: RequestApplySnapshotChunk): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.js deleted file mode 100644 index db05dcc..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.js +++ /dev/null @@ -1,4788 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { EvidenceParams, ValidatorParams, VersionParams, } from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export const protobufPackage = "tendermint.abci"; -export var CheckTxType; -(function (CheckTxType) { - CheckTxType[CheckTxType["NEW"] = 0] = "NEW"; - CheckTxType[CheckTxType["RECHECK"] = 1] = "RECHECK"; - CheckTxType[CheckTxType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(CheckTxType || (CheckTxType = {})); -export function checkTxTypeFromJSON(object) { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} -export function checkTxTypeToJSON(object) { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - default: - return "UNKNOWN"; - } -} -export var EvidenceType; -(function (EvidenceType) { - EvidenceType[EvidenceType["UNKNOWN"] = 0] = "UNKNOWN"; - EvidenceType[EvidenceType["DUPLICATE_VOTE"] = 1] = "DUPLICATE_VOTE"; - EvidenceType[EvidenceType["LIGHT_CLIENT_ATTACK"] = 2] = "LIGHT_CLIENT_ATTACK"; - EvidenceType[EvidenceType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(EvidenceType || (EvidenceType = {})); -export function evidenceTypeFromJSON(object) { - switch (object) { - case 0: - case "UNKNOWN": - return EvidenceType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return EvidenceType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return EvidenceType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return EvidenceType.UNRECOGNIZED; - } -} -export function evidenceTypeToJSON(object) { - switch (object) { - case EvidenceType.UNKNOWN: - return "UNKNOWN"; - case EvidenceType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case EvidenceType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - default: - return "UNKNOWN"; - } -} -export var ResponseOfferSnapshot_Result; -(function (ResponseOfferSnapshot_Result) { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNKNOWN"] = 0] = "UNKNOWN"; - /** ACCEPT - Snapshot accepted, apply chunks */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ACCEPT"] = 1] = "ACCEPT"; - /** ABORT - Abort all snapshot restoration */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ABORT"] = 2] = "ABORT"; - /** REJECT - Reject this specific snapshot, try others */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT"] = 3] = "REJECT"; - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_FORMAT"] = 4] = "REJECT_FORMAT"; - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_SENDER"] = 5] = "REJECT_SENDER"; - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ResponseOfferSnapshot_Result || (ResponseOfferSnapshot_Result = {})); -export function responseOfferSnapshot_ResultFromJSON(object) { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} -export function responseOfferSnapshot_ResultToJSON(object) { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - default: - return "UNKNOWN"; - } -} -export var ResponseApplySnapshotChunk_Result; -(function (ResponseApplySnapshotChunk_Result) { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNKNOWN"] = 0] = "UNKNOWN"; - /** ACCEPT - Chunk successfully accepted */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ACCEPT"] = 1] = "ACCEPT"; - /** ABORT - Abort all snapshot restoration */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ABORT"] = 2] = "ABORT"; - /** RETRY - Retry chunk (combine with refetch and reject) */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY"] = 3] = "RETRY"; - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY_SNAPSHOT"] = 4] = "RETRY_SNAPSHOT"; - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["REJECT_SNAPSHOT"] = 5] = "REJECT_SNAPSHOT"; - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ResponseApplySnapshotChunk_Result || (ResponseApplySnapshotChunk_Result = {})); -export function responseApplySnapshotChunk_ResultFromJSON(object) { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} -export function responseApplySnapshotChunk_ResultToJSON(object) { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - default: - return "UNKNOWN"; - } -} -const baseRequest = {}; -export const Request = { - encode(message, writer = Writer.create()) { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.setOption !== undefined) { - RequestSetOption.encode(message.setOption, writer.uint32(34).fork()).ldelim(); - } - if (message.initChain !== undefined) { - RequestInitChain.encode(message.initChain, writer.uint32(42).fork()).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - RequestBeginBlock.encode(message.beginBlock, writer.uint32(58).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - RequestDeliverTx.encode(message.deliverTx, writer.uint32(74).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - RequestEndBlock.encode(message.endBlock, writer.uint32(82).fork()).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - RequestListSnapshots.encode(message.listSnapshots, writer.uint32(98).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(106).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(114).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.setOption = RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.beginBlock = RequestBeginBlock.decode(reader, reader.uint32()); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.endBlock = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32()); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32()); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequest }; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromJSON(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromJSON(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromJSON(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromJSON(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromJSON(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromJSON(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromJSON(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromJSON(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromJSON(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromJSON(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromJSON(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromJSON(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromJSON(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.echo !== undefined && - (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? RequestFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? RequestSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? RequestInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? RequestQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? RequestBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? RequestCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? RequestDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? RequestEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? RequestCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? RequestListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? RequestOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequest }; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromPartial(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromPartial(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromPartial(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromPartial(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromPartial(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromPartial(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromPartial(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromPartial(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromPartial(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromPartial(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromPartial(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromPartial(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromPartial(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; -const baseRequestEcho = { message: "" }; -export const RequestEcho = { - encode(message, writer = Writer.create()) { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEcho }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } - else { - message.message = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } - else { - message.message = ""; - } - return message; - }, -}; -const baseRequestFlush = {}; -export const RequestFlush = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestFlush }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseRequestFlush }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseRequestFlush }; - return message; - }, -}; -const baseRequestInfo = { version: "", blockVersion: 0, p2pVersion: 0 }; -export const RequestInfo = { - encode(message, writer = Writer.create()) { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.blockVersion !== 0) { - writer.uint32(16).uint64(message.blockVersion); - } - if (message.p2pVersion !== 0) { - writer.uint32(24).uint64(message.p2pVersion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = longToNumber(reader.uint64()); - break; - case 3: - message.p2pVersion = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestInfo }; - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } - else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = Number(object.blockVersion); - } - else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = Number(object.p2pVersion); - } - else { - message.p2pVersion = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.version !== undefined && (obj.version = message.version); - message.blockVersion !== undefined && - (obj.blockVersion = message.blockVersion); - message.p2pVersion !== undefined && (obj.p2pVersion = message.p2pVersion); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestInfo }; - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } - else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = object.blockVersion; - } - else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = object.p2pVersion; - } - else { - message.p2pVersion = 0; - } - return message; - }, -}; -const baseRequestSetOption = { key: "", value: "" }; -export const RequestSetOption = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestSetOption }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestSetOption }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } - else { - message.value = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestSetOption }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = ""; - } - return message; - }, -}; -const baseRequestInitChain = { chainId: "", initialHeight: 0 }; -export const RequestInitChain = { - encode(message, writer = Writer.create()) { - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.appStateBytes.length !== 0) { - writer.uint32(42).bytes(message.appStateBytes); - } - if (message.initialHeight !== 0) { - writer.uint32(48).int64(message.initialHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInitChain }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 4: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestInitChain }; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } - else { - message.chainId = ""; - } - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromJSON(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = bytesFromBase64(object.appStateBytes); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = Number(object.initialHeight); - } - else { - message.initialHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.appStateBytes !== undefined && - (obj.appStateBytes = base64FromBytes(message.appStateBytes !== undefined - ? message.appStateBytes - : new Uint8Array())); - message.initialHeight !== undefined && - (obj.initialHeight = message.initialHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestInitChain }; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } - else { - message.chainId = ""; - } - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromPartial(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = object.appStateBytes; - } - else { - message.appStateBytes = new Uint8Array(); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = object.initialHeight; - } - else { - message.initialHeight = 0; - } - return message; - }, -}; -const baseRequestQuery = { path: "", height: 0, prove: false }; -export const RequestQuery = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestQuery }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.prove = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestQuery }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = Boolean(object.prove); - } - else { - message.prove = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.path !== undefined && (obj.path = message.path); - message.height !== undefined && (obj.height = message.height); - message.prove !== undefined && (obj.prove = message.prove); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestQuery }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = object.prove; - } - else { - message.prove = false; - } - return message; - }, -}; -const baseRequestBeginBlock = {}; -export const RequestBeginBlock = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.lastCommitInfo !== undefined) { - LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.byzantineValidators) { - Evidence.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestBeginBlock }; - message.byzantineValidators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.lastCommitInfo = LastCommitInfo.decode(reader, reader.uint32()); - break; - case 4: - message.byzantineValidators.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestBeginBlock }; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromJSON(object.lastCommitInfo); - } - else { - message.lastCommitInfo = undefined; - } - if (object.byzantineValidators !== undefined && - object.byzantineValidators !== null) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.lastCommitInfo !== undefined && - (obj.lastCommitInfo = message.lastCommitInfo - ? LastCommitInfo.toJSON(message.lastCommitInfo) - : undefined); - if (message.byzantineValidators) { - obj.byzantineValidators = message.byzantineValidators.map((e) => e ? Evidence.toJSON(e) : undefined); - } - else { - obj.byzantineValidators = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestBeginBlock }; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromPartial(object.lastCommitInfo); - } - else { - message.lastCommitInfo = undefined; - } - if (object.byzantineValidators !== undefined && - object.byzantineValidators !== null) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; -const baseRequestCheckTx = { type: 0 }; -export const RequestCheckTx = { - encode(message, writer = Writer.create()) { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCheckTx }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestCheckTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.type !== undefined && object.type !== null) { - message.type = checkTxTypeFromJSON(object.type); - } - else { - message.type = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestCheckTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } - else { - message.tx = new Uint8Array(); - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - return message; - }, -}; -const baseRequestDeliverTx = {}; -export const RequestDeliverTx = { - encode(message, writer = Writer.create()) { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestDeliverTx }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestDeliverTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestDeliverTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } - else { - message.tx = new Uint8Array(); - } - return message; - }, -}; -const baseRequestEndBlock = { height: 0 }; -export const RequestEndBlock = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEndBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestEndBlock }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestEndBlock }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseRequestCommit = {}; -export const RequestCommit = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCommit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseRequestCommit }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseRequestCommit }; - return message; - }, -}; -const baseRequestListSnapshots = {}; -export const RequestListSnapshots = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestListSnapshots }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseRequestListSnapshots }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseRequestListSnapshots }; - return message; - }, -}; -const baseRequestOfferSnapshot = {}; -export const RequestOfferSnapshot = { - encode(message, writer = Writer.create()) { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(18).bytes(message.appHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestOfferSnapshot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestOfferSnapshot }; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromJSON(object.snapshot); - } - else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.snapshot !== undefined && - (obj.snapshot = message.snapshot - ? Snapshot.toJSON(message.snapshot) - : undefined); - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestOfferSnapshot }; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromPartial(object.snapshot); - } - else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; -const baseRequestLoadSnapshotChunk = { height: 0, format: 0, chunk: 0 }; -export const RequestLoadSnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestLoadSnapshotChunk, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64()); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseRequestLoadSnapshotChunk, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } - else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = Number(object.chunk); - } - else { - message.chunk = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunk !== undefined && (obj.chunk = message.chunk); - return obj; - }, - fromPartial(object) { - const message = { - ...baseRequestLoadSnapshotChunk, - }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } - else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } - else { - message.chunk = 0; - } - return message; - }, -}; -const baseRequestApplySnapshotChunk = { index: 0, sender: "" }; -export const RequestApplySnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestApplySnapshotChunk, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseRequestApplySnapshotChunk, - }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.chunk !== undefined && - (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array())); - message.sender !== undefined && (obj.sender = message.sender); - return obj; - }, - fromPartial(object) { - const message = { - ...baseRequestApplySnapshotChunk, - }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } - else { - message.chunk = new Uint8Array(); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - return message; - }, -}; -const baseResponse = {}; -export const Response = { - encode(message, writer = Writer.create()) { - if (message.exception !== undefined) { - ResponseException.encode(message.exception, writer.uint32(10).fork()).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.setOption !== undefined) { - ResponseSetOption.encode(message.setOption, writer.uint32(42).fork()).ldelim(); - } - if (message.initChain !== undefined) { - ResponseInitChain.encode(message.initChain, writer.uint32(50).fork()).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - ResponseBeginBlock.encode(message.beginBlock, writer.uint32(66).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - ResponseCheckTx.encode(message.checkTx, writer.uint32(74).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - ResponseDeliverTx.encode(message.deliverTx, writer.uint32(82).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - ResponseEndBlock.encode(message.endBlock, writer.uint32(90).fork()).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(106).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(114).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(130).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.setOption = ResponseSetOption.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.beginBlock = ResponseBeginBlock.decode(reader, reader.uint32()); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.endBlock = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32()); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32()); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponse }; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromJSON(object.exception); - } - else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromJSON(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromJSON(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromJSON(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromJSON(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromJSON(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromJSON(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromJSON(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromJSON(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromJSON(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromJSON(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromJSON(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromJSON(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromJSON(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.exception !== undefined && - (obj.exception = message.exception - ? ResponseException.toJSON(message.exception) - : undefined); - message.echo !== undefined && - (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? ResponseFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? ResponseSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? ResponseInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? ResponseQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? ResponseBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? ResponseCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? ResponseDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? ResponseEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? ResponseCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? ResponseListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? ResponseOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponse }; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromPartial(object.exception); - } - else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromPartial(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromPartial(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromPartial(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromPartial(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromPartial(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromPartial(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromPartial(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromPartial(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromPartial(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromPartial(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromPartial(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromPartial(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromPartial(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; -const baseResponseException = { error: "" }; -export const ResponseException = { - encode(message, writer = Writer.create()) { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseException }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseException }; - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } - else { - message.error = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.error !== undefined && (obj.error = message.error); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseException }; - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } - else { - message.error = ""; - } - return message; - }, -}; -const baseResponseEcho = { message: "" }; -export const ResponseEcho = { - encode(message, writer = Writer.create()) { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEcho }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } - else { - message.message = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } - else { - message.message = ""; - } - return message; - }, -}; -const baseResponseFlush = {}; -export const ResponseFlush = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseFlush }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseResponseFlush }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseResponseFlush }; - return message; - }, -}; -const baseResponseInfo = { - data: "", - version: "", - appVersion: 0, - lastBlockHeight: 0, -}; -export const ResponseInfo = { - encode(message, writer = Writer.create()) { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.appVersion !== 0) { - writer.uint32(24).uint64(message.appVersion); - } - if (message.lastBlockHeight !== 0) { - writer.uint32(32).int64(message.lastBlockHeight); - } - if (message.lastBlockAppHash.length !== 0) { - writer.uint32(42).bytes(message.lastBlockAppHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = longToNumber(reader.uint64()); - break; - case 4: - message.lastBlockHeight = longToNumber(reader.int64()); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseInfo }; - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } - else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } - else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } - else { - message.appVersion = 0; - } - if (object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null) { - message.lastBlockHeight = Number(object.lastBlockHeight); - } - else { - message.lastBlockHeight = 0; - } - if (object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null) { - message.lastBlockAppHash = bytesFromBase64(object.lastBlockAppHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && (obj.data = message.data); - message.version !== undefined && (obj.version = message.version); - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - message.lastBlockHeight !== undefined && - (obj.lastBlockHeight = message.lastBlockHeight); - message.lastBlockAppHash !== undefined && - (obj.lastBlockAppHash = base64FromBytes(message.lastBlockAppHash !== undefined - ? message.lastBlockAppHash - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseInfo }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } - else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } - else { - message.appVersion = 0; - } - if (object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null) { - message.lastBlockHeight = object.lastBlockHeight; - } - else { - message.lastBlockHeight = 0; - } - if (object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null) { - message.lastBlockAppHash = object.lastBlockAppHash; - } - else { - message.lastBlockAppHash = new Uint8Array(); - } - return message; - }, -}; -const baseResponseSetOption = { code: 0, log: "", info: "" }; -export const ResponseSetOption = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseSetOption }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseSetOption }; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseSetOption }; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - return message; - }, -}; -const baseResponseInitChain = {}; -export const ResponseInitChain = { - encode(message, writer = Writer.create()) { - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(26).bytes(message.appHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInitChain }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 2: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseInitChain }; - message.validators = []; - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromJSON(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseInitChain }; - message.validators = []; - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromPartial(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; -const baseResponseQuery = { - code: 0, - log: "", - info: "", - index: 0, - height: 0, - codespace: "", -}; -export const ResponseQuery = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== 0) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proofOps !== undefined) { - ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseQuery }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.index = longToNumber(reader.int64()); - break; - case 6: - message.key = reader.bytes(); - break; - case 7: - message.value = reader.bytes(); - break; - case 8: - message.proofOps = ProofOps.decode(reader, reader.uint32()); - break; - case 9: - message.height = longToNumber(reader.int64()); - break; - case 10: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseQuery }; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromJSON(object.proofOps); - } - else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.index !== undefined && (obj.index = message.index); - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.proofOps !== undefined && - (obj.proofOps = message.proofOps - ? ProofOps.toJSON(message.proofOps) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseQuery }; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromPartial(object.proofOps); - } - else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - return message; - }, -}; -const baseResponseBeginBlock = {}; -export const ResponseBeginBlock = { - encode(message, writer = Writer.create()) { - for (const v of message.events) { - Event.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseBeginBlock }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseBeginBlock }; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseBeginBlock }; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseResponseCheckTx = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; -export const ResponseCheckTx = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCheckTx }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64()); - break; - case 6: - message.gasUsed = longToNumber(reader.int64()); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseCheckTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseCheckTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - return message; - }, -}; -const baseResponseDeliverTx = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; -export const ResponseDeliverTx = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseDeliverTx }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64()); - break; - case 6: - message.gasUsed = longToNumber(reader.int64()); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseDeliverTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseDeliverTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - return message; - }, -}; -const baseResponseEndBlock = {}; -export const ResponseEndBlock = { - encode(message, writer = Writer.create()) { - for (const v of message.validatorUpdates) { - ValidatorUpdate.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusParamUpdates !== undefined) { - ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEndBlock }; - message.validatorUpdates = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 2: - message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32()); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseEndBlock }; - message.validatorUpdates = []; - message.events = []; - if (object.validatorUpdates !== undefined && - object.validatorUpdates !== null) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null) { - message.consensusParamUpdates = ConsensusParams.fromJSON(object.consensusParamUpdates); - } - else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validatorUpdates) { - obj.validatorUpdates = message.validatorUpdates.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined); - } - else { - obj.validatorUpdates = []; - } - message.consensusParamUpdates !== undefined && - (obj.consensusParamUpdates = message.consensusParamUpdates - ? ConsensusParams.toJSON(message.consensusParamUpdates) - : undefined); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseEndBlock }; - message.validatorUpdates = []; - message.events = []; - if (object.validatorUpdates !== undefined && - object.validatorUpdates !== null) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null) { - message.consensusParamUpdates = ConsensusParams.fromPartial(object.consensusParamUpdates); - } - else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseResponseCommit = { retainHeight: 0 }; -export const ResponseCommit = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retainHeight !== 0) { - writer.uint32(24).int64(message.retainHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCommit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retainHeight = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseCommit }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = Number(object.retainHeight); - } - else { - message.retainHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.retainHeight !== undefined && - (obj.retainHeight = message.retainHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseCommit }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = object.retainHeight; - } - else { - message.retainHeight = 0; - } - return message; - }, -}; -const baseResponseListSnapshots = {}; -export const ResponseListSnapshots = { - encode(message, writer = Writer.create()) { - for (const v of message.snapshots) { - Snapshot.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseListSnapshots }; - message.snapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseListSnapshots }; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map((e) => e ? Snapshot.toJSON(e) : undefined); - } - else { - obj.snapshots = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseListSnapshots }; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromPartial(e)); - } - } - return message; - }, -}; -const baseResponseOfferSnapshot = { result: 0 }; -export const ResponseOfferSnapshot = { - encode(message, writer = Writer.create()) { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseOfferSnapshot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseOfferSnapshot }; - if (object.result !== undefined && object.result !== null) { - message.result = responseOfferSnapshot_ResultFromJSON(object.result); - } - else { - message.result = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.result !== undefined && - (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseOfferSnapshot }; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } - else { - message.result = 0; - } - return message; - }, -}; -const baseResponseLoadSnapshotChunk = {}; -export const ResponseLoadSnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseLoadSnapshotChunk, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseResponseLoadSnapshotChunk, - }; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.chunk !== undefined && - (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseResponseLoadSnapshotChunk, - }; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } - else { - message.chunk = new Uint8Array(); - } - return message; - }, -}; -const baseResponseApplySnapshotChunk = { - result: 0, - refetchChunks: 0, - rejectSenders: "", -}; -export const ResponseApplySnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetchChunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.rejectSenders) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseApplySnapshotChunk, - }; - message.refetchChunks = []; - message.rejectSenders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } - else { - message.refetchChunks.push(reader.uint32()); - } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseResponseApplySnapshotChunk, - }; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = responseApplySnapshotChunk_ResultFromJSON(object.result); - } - else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(Number(e)); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.result !== undefined && - (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetchChunks) { - obj.refetchChunks = message.refetchChunks.map((e) => e); - } - else { - obj.refetchChunks = []; - } - if (message.rejectSenders) { - obj.rejectSenders = message.rejectSenders.map((e) => e); - } - else { - obj.rejectSenders = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseResponseApplySnapshotChunk, - }; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } - else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(e); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(e); - } - } - return message; - }, -}; -const baseConsensusParams = {}; -export const ConsensusParams = { - encode(message, writer = Writer.create()) { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } - else { - message.version = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } - else { - message.version = undefined; - } - return message; - }, -}; -const baseBlockParams = { maxBytes: 0, maxGas: 0 }; -export const BlockParams = { - encode(message, writer = Writer.create()) { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64()); - break; - case 2: - message.maxGas = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } - else { - message.maxGas = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } - else { - message.maxGas = 0; - } - return message; - }, -}; -const baseLastCommitInfo = { round: 0 }; -export const LastCommitInfo = { - encode(message, writer = Writer.create()) { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastCommitInfo }; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLastCommitInfo }; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.round !== undefined && (obj.round = message.round); - if (message.votes) { - obj.votes = message.votes.map((e) => e ? VoteInfo.toJSON(e) : undefined); - } - else { - obj.votes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseLastCommitInfo }; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromPartial(e)); - } - } - return message; - }, -}; -const baseEvent = { type: "" }; -export const Event = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvent }; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(EventAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => e ? EventAttribute.toJSON(e) : undefined); - } - else { - obj.attributes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromPartial(e)); - } - } - return message; - }, -}; -const baseEventAttribute = { index: false }; -export const EventAttribute = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventAttribute }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEventAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.index !== undefined && object.index !== null) { - message.index = Boolean(object.index); - } - else { - message.index = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.index !== undefined && (obj.index = message.index); - return obj; - }, - fromPartial(object) { - const message = { ...baseEventAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = false; - } - return message; - }, -}; -const baseTxResult = { height: 0, index: 0 }; -export const TxResult = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode(message.result, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResult }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxResult }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromJSON(object.result); - } - else { - message.result = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.index !== undefined && (obj.index = message.index); - message.tx !== undefined && - (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - message.result !== undefined && - (obj.result = message.result - ? ResponseDeliverTx.toJSON(message.result) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxResult }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } - else { - message.tx = new Uint8Array(); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromPartial(object.result); - } - else { - message.result = undefined; - } - return message; - }, -}; -const baseValidator = { power: 0 }; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 3: - message.power = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && - (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = new Uint8Array(); - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - return message; - }, -}; -const baseValidatorUpdate = { power: 0 }; -export const ValidatorUpdate = { - encode(message, writer = Writer.create()) { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorUpdate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorUpdate }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorUpdate }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - return message; - }, -}; -const baseVoteInfo = { signedLastBlock: false }; -export const VoteInfo = { - encode(message, writer = Writer.create()) { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVoteInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVoteInfo }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.signedLastBlock !== undefined && - object.signedLastBlock !== null) { - message.signedLastBlock = Boolean(object.signedLastBlock); - } - else { - message.signedLastBlock = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.signedLastBlock !== undefined && - (obj.signedLastBlock = message.signedLastBlock); - return obj; - }, - fromPartial(object) { - const message = { ...baseVoteInfo }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.signedLastBlock !== undefined && - object.signedLastBlock !== null) { - message.signedLastBlock = object.signedLastBlock; - } - else { - message.signedLastBlock = false; - } - return message; - }, -}; -const baseEvidence = { type: 0, height: 0, totalVotingPower: 0 }; -export const Evidence = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(40).int64(message.totalVotingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.totalVotingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEvidence }; - if (object.type !== undefined && object.type !== null) { - message.type = evidenceTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = Number(object.totalVotingPower); - } - else { - message.totalVotingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseEvidence }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = object.totalVotingPower; - } - else { - message.totalVotingPower = 0; - } - return message; - }, -}; -const baseSnapshot = { height: 0, format: 0, chunks: 0 }; -export const Snapshot = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64()); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSnapshot }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } - else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = Number(object.chunks); - } - else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = bytesFromBase64(object.metadata); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunks !== undefined && (obj.chunks = message.chunks); - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.metadata !== undefined && - (obj.metadata = base64FromBytes(message.metadata !== undefined ? message.metadata : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseSnapshot }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } - else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = object.chunks; - } - else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = object.metadata; - } - else { - message.metadata = new Uint8Array(); - } - return message; - }, -}; -export class ABCIApplicationClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Echo(request) { - const data = RequestEcho.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Echo", data); - return promise.then((data) => ResponseEcho.decode(new Reader(data))); - } - Flush(request) { - const data = RequestFlush.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Flush", data); - return promise.then((data) => ResponseFlush.decode(new Reader(data))); - } - Info(request) { - const data = RequestInfo.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Info", data); - return promise.then((data) => ResponseInfo.decode(new Reader(data))); - } - SetOption(request) { - const data = RequestSetOption.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "SetOption", data); - return promise.then((data) => ResponseSetOption.decode(new Reader(data))); - } - DeliverTx(request) { - const data = RequestDeliverTx.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "DeliverTx", data); - return promise.then((data) => ResponseDeliverTx.decode(new Reader(data))); - } - CheckTx(request) { - const data = RequestCheckTx.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "CheckTx", data); - return promise.then((data) => ResponseCheckTx.decode(new Reader(data))); - } - Query(request) { - const data = RequestQuery.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Query", data); - return promise.then((data) => ResponseQuery.decode(new Reader(data))); - } - Commit(request) { - const data = RequestCommit.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Commit", data); - return promise.then((data) => ResponseCommit.decode(new Reader(data))); - } - InitChain(request) { - const data = RequestInitChain.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "InitChain", data); - return promise.then((data) => ResponseInitChain.decode(new Reader(data))); - } - BeginBlock(request) { - const data = RequestBeginBlock.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "BeginBlock", data); - return promise.then((data) => ResponseBeginBlock.decode(new Reader(data))); - } - EndBlock(request) { - const data = RequestEndBlock.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "EndBlock", data); - return promise.then((data) => ResponseEndBlock.decode(new Reader(data))); - } - ListSnapshots(request) { - const data = RequestListSnapshots.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ListSnapshots", data); - return promise.then((data) => ResponseListSnapshots.decode(new Reader(data))); - } - OfferSnapshot(request) { - const data = RequestOfferSnapshot.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "OfferSnapshot", data); - return promise.then((data) => ResponseOfferSnapshot.decode(new Reader(data))); - } - LoadSnapshotChunk(request) { - const data = RequestLoadSnapshotChunk.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "LoadSnapshotChunk", data); - return promise.then((data) => ResponseLoadSnapshotChunk.decode(new Reader(data))); - } - ApplySnapshotChunk(request) { - const data = RequestApplySnapshotChunk.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ApplySnapshotChunk", data); - return promise.then((data) => ResponseApplySnapshotChunk.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.ts deleted file mode 100644 index ccb5148..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/abci/types.ts +++ /dev/null @@ -1,5624 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { - EvidenceParams, - ValidatorParams, - VersionParams, -} from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.abci"; - -export enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1, -} - -export function checkTxTypeFromJSON(object: any): CheckTxType { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} - -export function checkTxTypeToJSON(object: CheckTxType): string { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - default: - return "UNKNOWN"; - } -} - -export enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1, -} - -export function evidenceTypeFromJSON(object: any): EvidenceType { - switch (object) { - case 0: - case "UNKNOWN": - return EvidenceType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return EvidenceType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return EvidenceType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return EvidenceType.UNRECOGNIZED; - } -} - -export function evidenceTypeToJSON(object: EvidenceType): string { - switch (object) { - case EvidenceType.UNKNOWN: - return "UNKNOWN"; - case EvidenceType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case EvidenceType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - default: - return "UNKNOWN"; - } -} - -export interface Request { - echo: RequestEcho | undefined; - flush: RequestFlush | undefined; - info: RequestInfo | undefined; - setOption: RequestSetOption | undefined; - initChain: RequestInitChain | undefined; - query: RequestQuery | undefined; - beginBlock: RequestBeginBlock | undefined; - checkTx: RequestCheckTx | undefined; - deliverTx: RequestDeliverTx | undefined; - endBlock: RequestEndBlock | undefined; - commit: RequestCommit | undefined; - listSnapshots: RequestListSnapshots | undefined; - offerSnapshot: RequestOfferSnapshot | undefined; - loadSnapshotChunk: RequestLoadSnapshotChunk | undefined; - applySnapshotChunk: RequestApplySnapshotChunk | undefined; -} - -export interface RequestEcho { - message: string; -} - -export interface RequestFlush {} - -export interface RequestInfo { - version: string; - blockVersion: number; - p2pVersion: number; -} - -/** nondeterministic */ -export interface RequestSetOption { - key: string; - value: string; -} - -export interface RequestInitChain { - time: Date | undefined; - chainId: string; - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appStateBytes: Uint8Array; - initialHeight: number; -} - -export interface RequestQuery { - data: Uint8Array; - path: string; - height: number; - prove: boolean; -} - -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header | undefined; - lastCommitInfo: LastCommitInfo | undefined; - byzantineValidators: Evidence[]; -} - -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} - -export interface RequestDeliverTx { - tx: Uint8Array; -} - -export interface RequestEndBlock { - height: number; -} - -export interface RequestCommit {} - -/** lists available snapshots */ -export interface RequestListSnapshots {} - -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot: Snapshot | undefined; - /** light client-verified app hash for snapshot height */ - appHash: Uint8Array; -} - -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: number; - format: number; - chunk: number; -} - -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} - -export interface Response { - exception: ResponseException | undefined; - echo: ResponseEcho | undefined; - flush: ResponseFlush | undefined; - info: ResponseInfo | undefined; - setOption: ResponseSetOption | undefined; - initChain: ResponseInitChain | undefined; - query: ResponseQuery | undefined; - beginBlock: ResponseBeginBlock | undefined; - checkTx: ResponseCheckTx | undefined; - deliverTx: ResponseDeliverTx | undefined; - endBlock: ResponseEndBlock | undefined; - commit: ResponseCommit | undefined; - listSnapshots: ResponseListSnapshots | undefined; - offerSnapshot: ResponseOfferSnapshot | undefined; - loadSnapshotChunk: ResponseLoadSnapshotChunk | undefined; - applySnapshotChunk: ResponseApplySnapshotChunk | undefined; -} - -/** nondeterministic */ -export interface ResponseException { - error: string; -} - -export interface ResponseEcho { - message: string; -} - -export interface ResponseFlush {} - -export interface ResponseInfo { - data: string; - version: string; - appVersion: number; - lastBlockHeight: number; - lastBlockAppHash: Uint8Array; -} - -/** nondeterministic */ -export interface ResponseSetOption { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} - -export interface ResponseInitChain { - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appHash: Uint8Array; -} - -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: number; - key: Uint8Array; - value: Uint8Array; - proofOps: ProofOps | undefined; - height: number; - codespace: string; -} - -export interface ResponseBeginBlock { - events: Event[]; -} - -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} - -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} - -export interface ResponseEndBlock { - validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates: ConsensusParams | undefined; - events: Event[]; -} - -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retainHeight: number; -} - -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} - -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} - -export enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1, -} - -export function responseOfferSnapshot_ResultFromJSON( - object: any -): ResponseOfferSnapshot_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} - -export function responseOfferSnapshot_ResultToJSON( - object: ResponseOfferSnapshot_Result -): string { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - default: - return "UNKNOWN"; - } -} - -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} - -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetchChunks: number[]; - /** Chunk senders to reject and ban */ - rejectSenders: string[]; -} - -export enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1, -} - -export function responseApplySnapshotChunk_ResultFromJSON( - object: any -): ResponseApplySnapshotChunk_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} - -export function responseApplySnapshotChunk_ResultToJSON( - object: ResponseApplySnapshotChunk_Result -): string { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - default: - return "UNKNOWN"; - } -} - -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} - -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** Note: must be greater than 0 */ - maxBytes: number; - /** Note: must be greater or equal to -1 */ - maxGas: number; -} - -export interface LastCommitInfo { - round: number; - votes: VoteInfo[]; -} - -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} - -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} - -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: number; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx | undefined; -} - -/** Validator */ -export interface Validator { - /** The first 20 bytes of SHA256(public key) */ - address: Uint8Array; - /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ - power: number; -} - -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pubKey: PublicKey | undefined; - power: number; -} - -/** VoteInfo */ -export interface VoteInfo { - validator: Validator | undefined; - signedLastBlock: boolean; -} - -export interface Evidence { - type: EvidenceType; - /** The offending validator */ - validator: Validator | undefined; - /** The height when the offense occurred */ - height: number; - /** The corresponding time where the offense occurred */ - time: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - totalVotingPower: number; -} - -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: number; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} - -const baseRequest: object = {}; - -export const Request = { - encode(message: Request, writer: Writer = Writer.create()): Writer { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.setOption !== undefined) { - RequestSetOption.encode( - message.setOption, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.initChain !== undefined) { - RequestInitChain.encode( - message.initChain, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - RequestBeginBlock.encode( - message.beginBlock, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.checkTx !== undefined) { - RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - RequestDeliverTx.encode( - message.deliverTx, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.endBlock !== undefined) { - RequestEndBlock.encode( - message.endBlock, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - RequestListSnapshots.encode( - message.listSnapshots, - writer.uint32(98).fork() - ).ldelim(); - } - if (message.offerSnapshot !== undefined) { - RequestOfferSnapshot.encode( - message.offerSnapshot, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - RequestLoadSnapshotChunk.encode( - message.loadSnapshotChunk, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - RequestApplySnapshotChunk.encode( - message.applySnapshotChunk, - writer.uint32(122).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Request { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequest } as Request; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.setOption = RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.beginBlock = RequestBeginBlock.decode( - reader, - reader.uint32() - ); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.endBlock = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode( - reader, - reader.uint32() - ); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Request { - const message = { ...baseRequest } as Request; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromJSON(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromJSON(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromJSON(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromJSON(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromJSON(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromJSON(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromJSON(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromJSON(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromJSON(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromJSON(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromJSON( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromJSON( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromJSON( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromJSON( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, - - toJSON(message: Request): unknown { - const obj: any = {}; - message.echo !== undefined && - (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? RequestFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? RequestSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? RequestInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? RequestQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? RequestBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? RequestCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? RequestDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? RequestEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? RequestCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? RequestListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? RequestOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Request { - const message = { ...baseRequest } as Request; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromPartial(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromPartial(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromPartial(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromPartial(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromPartial(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromPartial(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromPartial(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromPartial(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromPartial(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromPartial(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromPartial( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromPartial( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromPartial( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromPartial( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; - -const baseRequestEcho: object = { message: "" }; - -export const RequestEcho = { - encode(message: RequestEcho, writer: Writer = Writer.create()): Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestEcho { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEcho } as RequestEcho; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestEcho { - const message = { ...baseRequestEcho } as RequestEcho; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } else { - message.message = ""; - } - return message; - }, - - toJSON(message: RequestEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial(object: DeepPartial): RequestEcho { - const message = { ...baseRequestEcho } as RequestEcho; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } else { - message.message = ""; - } - return message; - }, -}; - -const baseRequestFlush: object = {}; - -export const RequestFlush = { - encode(_: RequestFlush, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestFlush { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestFlush } as RequestFlush; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestFlush { - const message = { ...baseRequestFlush } as RequestFlush; - return message; - }, - - toJSON(_: RequestFlush): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestFlush { - const message = { ...baseRequestFlush } as RequestFlush; - return message; - }, -}; - -const baseRequestInfo: object = { version: "", blockVersion: 0, p2pVersion: 0 }; - -export const RequestInfo = { - encode(message: RequestInfo, writer: Writer = Writer.create()): Writer { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.blockVersion !== 0) { - writer.uint32(16).uint64(message.blockVersion); - } - if (message.p2pVersion !== 0) { - writer.uint32(24).uint64(message.p2pVersion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInfo } as RequestInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = longToNumber(reader.uint64() as Long); - break; - case 3: - message.p2pVersion = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestInfo { - const message = { ...baseRequestInfo } as RequestInfo; - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = Number(object.blockVersion); - } else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = Number(object.p2pVersion); - } else { - message.p2pVersion = 0; - } - return message; - }, - - toJSON(message: RequestInfo): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = message.version); - message.blockVersion !== undefined && - (obj.blockVersion = message.blockVersion); - message.p2pVersion !== undefined && (obj.p2pVersion = message.p2pVersion); - return obj; - }, - - fromPartial(object: DeepPartial): RequestInfo { - const message = { ...baseRequestInfo } as RequestInfo; - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = object.blockVersion; - } else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = object.p2pVersion; - } else { - message.p2pVersion = 0; - } - return message; - }, -}; - -const baseRequestSetOption: object = { key: "", value: "" }; - -export const RequestSetOption = { - encode(message: RequestSetOption, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestSetOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestSetOption } as RequestSetOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestSetOption { - const message = { ...baseRequestSetOption } as RequestSetOption; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: RequestSetOption): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): RequestSetOption { - const message = { ...baseRequestSetOption } as RequestSetOption; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -const baseRequestInitChain: object = { chainId: "", initialHeight: 0 }; - -export const RequestInitChain = { - encode(message: RequestInitChain, writer: Writer = Writer.create()): Writer { - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(10).fork() - ).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.consensusParams !== undefined) { - ConsensusParams.encode( - message.consensusParams, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.appStateBytes.length !== 0) { - writer.uint32(42).bytes(message.appStateBytes); - } - if (message.initialHeight !== 0) { - writer.uint32(48).int64(message.initialHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestInitChain { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.validators.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestInitChain { - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } else { - message.chainId = ""; - } - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromJSON( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = bytesFromBase64(object.appStateBytes); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = Number(object.initialHeight); - } else { - message.initialHeight = 0; - } - return message; - }, - - toJSON(message: RequestInitChain): unknown { - const obj: any = {}; - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.appStateBytes !== undefined && - (obj.appStateBytes = base64FromBytes( - message.appStateBytes !== undefined - ? message.appStateBytes - : new Uint8Array() - )); - message.initialHeight !== undefined && - (obj.initialHeight = message.initialHeight); - return obj; - }, - - fromPartial(object: DeepPartial): RequestInitChain { - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } else { - message.chainId = ""; - } - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromPartial( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = object.appStateBytes; - } else { - message.appStateBytes = new Uint8Array(); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = object.initialHeight; - } else { - message.initialHeight = 0; - } - return message; - }, -}; - -const baseRequestQuery: object = { path: "", height: 0, prove: false }; - -export const RequestQuery = { - encode(message: RequestQuery, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestQuery { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestQuery } as RequestQuery; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.prove = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestQuery { - const message = { ...baseRequestQuery } as RequestQuery; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = Boolean(object.prove); - } else { - message.prove = false; - } - return message; - }, - - toJSON(message: RequestQuery): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.path !== undefined && (obj.path = message.path); - message.height !== undefined && (obj.height = message.height); - message.prove !== undefined && (obj.prove = message.prove); - return obj; - }, - - fromPartial(object: DeepPartial): RequestQuery { - const message = { ...baseRequestQuery } as RequestQuery; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = object.prove; - } else { - message.prove = false; - } - return message; - }, -}; - -const baseRequestBeginBlock: object = {}; - -export const RequestBeginBlock = { - encode(message: RequestBeginBlock, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.lastCommitInfo !== undefined) { - LastCommitInfo.encode( - message.lastCommitInfo, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.byzantineValidators) { - Evidence.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestBeginBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantineValidators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.lastCommitInfo = LastCommitInfo.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.byzantineValidators.push( - Evidence.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestBeginBlock { - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromJSON(object.lastCommitInfo); - } else { - message.lastCommitInfo = undefined; - } - if ( - object.byzantineValidators !== undefined && - object.byzantineValidators !== null - ) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: RequestBeginBlock): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.lastCommitInfo !== undefined && - (obj.lastCommitInfo = message.lastCommitInfo - ? LastCommitInfo.toJSON(message.lastCommitInfo) - : undefined); - if (message.byzantineValidators) { - obj.byzantineValidators = message.byzantineValidators.map((e) => - e ? Evidence.toJSON(e) : undefined - ); - } else { - obj.byzantineValidators = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): RequestBeginBlock { - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromPartial( - object.lastCommitInfo - ); - } else { - message.lastCommitInfo = undefined; - } - if ( - object.byzantineValidators !== undefined && - object.byzantineValidators !== null - ) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; - -const baseRequestCheckTx: object = { type: 0 }; - -export const RequestCheckTx = { - encode(message: RequestCheckTx, writer: Writer = Writer.create()): Writer { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestCheckTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCheckTx } as RequestCheckTx; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestCheckTx { - const message = { ...baseRequestCheckTx } as RequestCheckTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.type !== undefined && object.type !== null) { - message.type = checkTxTypeFromJSON(object.type); - } else { - message.type = 0; - } - return message; - }, - - toJSON(message: RequestCheckTx): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - - fromPartial(object: DeepPartial): RequestCheckTx { - const message = { ...baseRequestCheckTx } as RequestCheckTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - return message; - }, -}; - -const baseRequestDeliverTx: object = {}; - -export const RequestDeliverTx = { - encode(message: RequestDeliverTx, writer: Writer = Writer.create()): Writer { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestDeliverTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestDeliverTx { - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - return message; - }, - - toJSON(message: RequestDeliverTx): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): RequestDeliverTx { - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - return message; - }, -}; - -const baseRequestEndBlock: object = { height: 0 }; - -export const RequestEndBlock = { - encode(message: RequestEndBlock, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestEndBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEndBlock } as RequestEndBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestEndBlock { - const message = { ...baseRequestEndBlock } as RequestEndBlock; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: RequestEndBlock): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial(object: DeepPartial): RequestEndBlock { - const message = { ...baseRequestEndBlock } as RequestEndBlock; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseRequestCommit: object = {}; - -export const RequestCommit = { - encode(_: RequestCommit, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestCommit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCommit } as RequestCommit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestCommit { - const message = { ...baseRequestCommit } as RequestCommit; - return message; - }, - - toJSON(_: RequestCommit): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestCommit { - const message = { ...baseRequestCommit } as RequestCommit; - return message; - }, -}; - -const baseRequestListSnapshots: object = {}; - -export const RequestListSnapshots = { - encode(_: RequestListSnapshots, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestListSnapshots { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestListSnapshots { - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - return message; - }, - - toJSON(_: RequestListSnapshots): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestListSnapshots { - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - return message; - }, -}; - -const baseRequestOfferSnapshot: object = {}; - -export const RequestOfferSnapshot = { - encode( - message: RequestOfferSnapshot, - writer: Writer = Writer.create() - ): Writer { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(18).bytes(message.appHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestOfferSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestOfferSnapshot { - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromJSON(object.snapshot); - } else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - - toJSON(message: RequestOfferSnapshot): unknown { - const obj: any = {}; - message.snapshot !== undefined && - (obj.snapshot = message.snapshot - ? Snapshot.toJSON(message.snapshot) - : undefined); - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): RequestOfferSnapshot { - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromPartial(object.snapshot); - } else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; - -const baseRequestLoadSnapshotChunk: object = { height: 0, format: 0, chunk: 0 }; - -export const RequestLoadSnapshotChunk = { - encode( - message: RequestLoadSnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RequestLoadSnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestLoadSnapshotChunk { - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = Number(object.chunk); - } else { - message.chunk = 0; - } - return message; - }, - - toJSON(message: RequestLoadSnapshotChunk): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunk !== undefined && (obj.chunk = message.chunk); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RequestLoadSnapshotChunk { - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = 0; - } - return message; - }, -}; - -const baseRequestApplySnapshotChunk: object = { index: 0, sender: "" }; - -export const RequestApplySnapshotChunk = { - encode( - message: RequestApplySnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RequestApplySnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestApplySnapshotChunk { - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - return message; - }, - - toJSON(message: RequestApplySnapshotChunk): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.chunk !== undefined && - (obj.chunk = base64FromBytes( - message.chunk !== undefined ? message.chunk : new Uint8Array() - )); - message.sender !== undefined && (obj.sender = message.sender); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RequestApplySnapshotChunk { - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = new Uint8Array(); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - return message; - }, -}; - -const baseResponse: object = {}; - -export const Response = { - encode(message: Response, writer: Writer = Writer.create()): Writer { - if (message.exception !== undefined) { - ResponseException.encode( - message.exception, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.setOption !== undefined) { - ResponseSetOption.encode( - message.setOption, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.initChain !== undefined) { - ResponseInitChain.encode( - message.initChain, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - ResponseBeginBlock.encode( - message.beginBlock, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.checkTx !== undefined) { - ResponseCheckTx.encode( - message.checkTx, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.deliverTx !== undefined) { - ResponseDeliverTx.encode( - message.deliverTx, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.endBlock !== undefined) { - ResponseEndBlock.encode( - message.endBlock, - writer.uint32(90).fork() - ).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - ResponseListSnapshots.encode( - message.listSnapshots, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.offerSnapshot !== undefined) { - ResponseOfferSnapshot.encode( - message.offerSnapshot, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - ResponseLoadSnapshotChunk.encode( - message.loadSnapshotChunk, - writer.uint32(122).fork() - ).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - ResponseApplySnapshotChunk.encode( - message.applySnapshotChunk, - writer.uint32(130).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Response { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponse } as Response; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.setOption = ResponseSetOption.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.beginBlock = ResponseBeginBlock.decode( - reader, - reader.uint32() - ); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.endBlock = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Response { - const message = { ...baseResponse } as Response; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromJSON(object.exception); - } else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromJSON(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromJSON(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromJSON(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromJSON(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromJSON(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromJSON(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromJSON(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromJSON(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromJSON(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromJSON(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromJSON( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromJSON( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromJSON( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromJSON( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, - - toJSON(message: Response): unknown { - const obj: any = {}; - message.exception !== undefined && - (obj.exception = message.exception - ? ResponseException.toJSON(message.exception) - : undefined); - message.echo !== undefined && - (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? ResponseFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? ResponseSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? ResponseInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? ResponseQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? ResponseBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? ResponseCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? ResponseDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? ResponseEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? ResponseCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? ResponseListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? ResponseOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Response { - const message = { ...baseResponse } as Response; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromPartial(object.exception); - } else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromPartial(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromPartial(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromPartial(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromPartial(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromPartial(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromPartial(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromPartial(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromPartial(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromPartial(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromPartial(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromPartial( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromPartial( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromPartial( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromPartial( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; - -const baseResponseException: object = { error: "" }; - -export const ResponseException = { - encode(message: ResponseException, writer: Writer = Writer.create()): Writer { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseException { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseException } as ResponseException; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseException { - const message = { ...baseResponseException } as ResponseException; - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } else { - message.error = ""; - } - return message; - }, - - toJSON(message: ResponseException): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = message.error); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseException { - const message = { ...baseResponseException } as ResponseException; - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } else { - message.error = ""; - } - return message; - }, -}; - -const baseResponseEcho: object = { message: "" }; - -export const ResponseEcho = { - encode(message: ResponseEcho, writer: Writer = Writer.create()): Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseEcho { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEcho } as ResponseEcho; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseEcho { - const message = { ...baseResponseEcho } as ResponseEcho; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } else { - message.message = ""; - } - return message; - }, - - toJSON(message: ResponseEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseEcho { - const message = { ...baseResponseEcho } as ResponseEcho; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } else { - message.message = ""; - } - return message; - }, -}; - -const baseResponseFlush: object = {}; - -export const ResponseFlush = { - encode(_: ResponseFlush, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseFlush { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseFlush } as ResponseFlush; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): ResponseFlush { - const message = { ...baseResponseFlush } as ResponseFlush; - return message; - }, - - toJSON(_: ResponseFlush): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): ResponseFlush { - const message = { ...baseResponseFlush } as ResponseFlush; - return message; - }, -}; - -const baseResponseInfo: object = { - data: "", - version: "", - appVersion: 0, - lastBlockHeight: 0, -}; - -export const ResponseInfo = { - encode(message: ResponseInfo, writer: Writer = Writer.create()): Writer { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.appVersion !== 0) { - writer.uint32(24).uint64(message.appVersion); - } - if (message.lastBlockHeight !== 0) { - writer.uint32(32).int64(message.lastBlockHeight); - } - if (message.lastBlockAppHash.length !== 0) { - writer.uint32(42).bytes(message.lastBlockAppHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInfo } as ResponseInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = longToNumber(reader.uint64() as Long); - break; - case 4: - message.lastBlockHeight = longToNumber(reader.int64() as Long); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseInfo { - const message = { ...baseResponseInfo } as ResponseInfo; - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } else { - message.appVersion = 0; - } - if ( - object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null - ) { - message.lastBlockHeight = Number(object.lastBlockHeight); - } else { - message.lastBlockHeight = 0; - } - if ( - object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null - ) { - message.lastBlockAppHash = bytesFromBase64(object.lastBlockAppHash); - } - return message; - }, - - toJSON(message: ResponseInfo): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = message.data); - message.version !== undefined && (obj.version = message.version); - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - message.lastBlockHeight !== undefined && - (obj.lastBlockHeight = message.lastBlockHeight); - message.lastBlockAppHash !== undefined && - (obj.lastBlockAppHash = base64FromBytes( - message.lastBlockAppHash !== undefined - ? message.lastBlockAppHash - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseInfo { - const message = { ...baseResponseInfo } as ResponseInfo; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } else { - message.appVersion = 0; - } - if ( - object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null - ) { - message.lastBlockHeight = object.lastBlockHeight; - } else { - message.lastBlockHeight = 0; - } - if ( - object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null - ) { - message.lastBlockAppHash = object.lastBlockAppHash; - } else { - message.lastBlockAppHash = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseSetOption: object = { code: 0, log: "", info: "" }; - -export const ResponseSetOption = { - encode(message: ResponseSetOption, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseSetOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseSetOption } as ResponseSetOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseSetOption { - const message = { ...baseResponseSetOption } as ResponseSetOption; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: ResponseSetOption): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseSetOption { - const message = { ...baseResponseSetOption } as ResponseSetOption; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseResponseInitChain: object = {}; - -export const ResponseInitChain = { - encode(message: ResponseInitChain, writer: Writer = Writer.create()): Writer { - if (message.consensusParams !== undefined) { - ConsensusParams.encode( - message.consensusParams, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(26).bytes(message.appHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseInitChain { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.validators.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseInitChain { - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromJSON( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - - toJSON(message: ResponseInitChain): unknown { - const obj: any = {}; - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseInitChain { - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromPartial( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseQuery: object = { - code: 0, - log: "", - info: "", - index: 0, - height: 0, - codespace: "", -}; - -export const ResponseQuery = { - encode(message: ResponseQuery, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== 0) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proofOps !== undefined) { - ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseQuery { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseQuery } as ResponseQuery; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.index = longToNumber(reader.int64() as Long); - break; - case 6: - message.key = reader.bytes(); - break; - case 7: - message.value = reader.bytes(); - break; - case 8: - message.proofOps = ProofOps.decode(reader, reader.uint32()); - break; - case 9: - message.height = longToNumber(reader.int64() as Long); - break; - case 10: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseQuery { - const message = { ...baseResponseQuery } as ResponseQuery; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromJSON(object.proofOps); - } else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseQuery): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.index !== undefined && (obj.index = message.index); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.proofOps !== undefined && - (obj.proofOps = message.proofOps - ? ProofOps.toJSON(message.proofOps) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseQuery { - const message = { ...baseResponseQuery } as ResponseQuery; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromPartial(object.proofOps); - } else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseBeginBlock: object = {}; - -export const ResponseBeginBlock = { - encode( - message: ResponseBeginBlock, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.events) { - Event.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseBeginBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseBeginBlock { - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseBeginBlock): unknown { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ResponseBeginBlock { - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseCheckTx: object = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; - -export const ResponseCheckTx = { - encode(message: ResponseCheckTx, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseCheckTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64() as Long); - break; - case 6: - message.gasUsed = longToNumber(reader.int64() as Long); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseCheckTx { - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseCheckTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseCheckTx { - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseDeliverTx: object = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; - -export const ResponseDeliverTx = { - encode(message: ResponseDeliverTx, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseDeliverTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64() as Long); - break; - case 6: - message.gasUsed = longToNumber(reader.int64() as Long); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseDeliverTx { - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseDeliverTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseDeliverTx { - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseEndBlock: object = {}; - -export const ResponseEndBlock = { - encode(message: ResponseEndBlock, writer: Writer = Writer.create()): Writer { - for (const v of message.validatorUpdates) { - ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusParamUpdates !== undefined) { - ConsensusParams.encode( - message.consensusParamUpdates, - writer.uint32(18).fork() - ).ldelim(); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseEndBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validatorUpdates = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorUpdates.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 2: - message.consensusParamUpdates = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseEndBlock { - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validatorUpdates = []; - message.events = []; - if ( - object.validatorUpdates !== undefined && - object.validatorUpdates !== null - ) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromJSON(e)); - } - } - if ( - object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null - ) { - message.consensusParamUpdates = ConsensusParams.fromJSON( - object.consensusParamUpdates - ); - } else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseEndBlock): unknown { - const obj: any = {}; - if (message.validatorUpdates) { - obj.validatorUpdates = message.validatorUpdates.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validatorUpdates = []; - } - message.consensusParamUpdates !== undefined && - (obj.consensusParamUpdates = message.consensusParamUpdates - ? ConsensusParams.toJSON(message.consensusParamUpdates) - : undefined); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ResponseEndBlock { - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validatorUpdates = []; - message.events = []; - if ( - object.validatorUpdates !== undefined && - object.validatorUpdates !== null - ) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromPartial(e)); - } - } - if ( - object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null - ) { - message.consensusParamUpdates = ConsensusParams.fromPartial( - object.consensusParamUpdates - ); - } else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseCommit: object = { retainHeight: 0 }; - -export const ResponseCommit = { - encode(message: ResponseCommit, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retainHeight !== 0) { - writer.uint32(24).int64(message.retainHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseCommit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCommit } as ResponseCommit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retainHeight = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseCommit { - const message = { ...baseResponseCommit } as ResponseCommit; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = Number(object.retainHeight); - } else { - message.retainHeight = 0; - } - return message; - }, - - toJSON(message: ResponseCommit): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.retainHeight !== undefined && - (obj.retainHeight = message.retainHeight); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseCommit { - const message = { ...baseResponseCommit } as ResponseCommit; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = object.retainHeight; - } else { - message.retainHeight = 0; - } - return message; - }, -}; - -const baseResponseListSnapshots: object = {}; - -export const ResponseListSnapshots = { - encode( - message: ResponseListSnapshots, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.snapshots) { - Snapshot.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseListSnapshots { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseListSnapshots { - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseListSnapshots): unknown { - const obj: any = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map((e) => - e ? Snapshot.toJSON(e) : undefined - ); - } else { - obj.snapshots = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseListSnapshots { - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseOfferSnapshot: object = { result: 0 }; - -export const ResponseOfferSnapshot = { - encode( - message: ResponseOfferSnapshot, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseOfferSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseOfferSnapshot { - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - if (object.result !== undefined && object.result !== null) { - message.result = responseOfferSnapshot_ResultFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: ResponseOfferSnapshot): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseOfferSnapshot { - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -const baseResponseLoadSnapshotChunk: object = {}; - -export const ResponseLoadSnapshotChunk = { - encode( - message: ResponseLoadSnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ResponseLoadSnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseLoadSnapshotChunk { - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - return message; - }, - - toJSON(message: ResponseLoadSnapshotChunk): unknown { - const obj: any = {}; - message.chunk !== undefined && - (obj.chunk = base64FromBytes( - message.chunk !== undefined ? message.chunk : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseLoadSnapshotChunk { - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseApplySnapshotChunk: object = { - result: 0, - refetchChunks: 0, - rejectSenders: "", -}; - -export const ResponseApplySnapshotChunk = { - encode( - message: ResponseApplySnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetchChunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.rejectSenders) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ResponseApplySnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetchChunks = []; - message.rejectSenders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } else { - message.refetchChunks.push(reader.uint32()); - } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseApplySnapshotChunk { - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = responseApplySnapshotChunk_ResultFromJSON(object.result); - } else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(Number(e)); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(String(e)); - } - } - return message; - }, - - toJSON(message: ResponseApplySnapshotChunk): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetchChunks) { - obj.refetchChunks = message.refetchChunks.map((e) => e); - } else { - obj.refetchChunks = []; - } - if (message.rejectSenders) { - obj.rejectSenders = message.rejectSenders.map((e) => e); - } else { - obj.rejectSenders = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseApplySnapshotChunk { - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(e); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(e); - } - } - return message; - }, -}; - -const baseConsensusParams: object = {}; - -export const ConsensusParams = { - encode(message: ConsensusParams, writer: Writer = Writer.create()): Writer { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode( - message.evidence, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode( - message.validator, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams } as ConsensusParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } else { - message.version = undefined; - } - return message; - }, - - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } else { - message.version = undefined; - } - return message; - }, -}; - -const baseBlockParams: object = { maxBytes: 0, maxGas: 0 }; - -export const BlockParams = { - encode(message: BlockParams, writer: Writer = Writer.create()): Writer { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams } as BlockParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.maxGas = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } else { - message.maxGas = 0; - } - return message; - }, - - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - return obj; - }, - - fromPartial(object: DeepPartial): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } else { - message.maxGas = 0; - } - return message; - }, -}; - -const baseLastCommitInfo: object = { round: 0 }; - -export const LastCommitInfo = { - encode(message: LastCommitInfo, writer: Writer = Writer.create()): Writer { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LastCommitInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LastCommitInfo { - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: LastCommitInfo): unknown { - const obj: any = {}; - message.round !== undefined && (obj.round = message.round); - if (message.votes) { - obj.votes = message.votes.map((e) => - e ? VoteInfo.toJSON(e) : undefined - ); - } else { - obj.votes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): LastCommitInfo { - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEvent: object = { type: "" }; - -export const Event = { - encode(message: Event, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Event { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvent } as Event; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push( - EventAttribute.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Event { - const message = { ...baseEvent } as Event; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Event): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? EventAttribute.toJSON(e) : undefined - ); - } else { - obj.attributes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Event { - const message = { ...baseEvent } as Event; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEventAttribute: object = { index: false }; - -export const EventAttribute = { - encode(message: EventAttribute, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EventAttribute { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventAttribute } as EventAttribute; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EventAttribute { - const message = { ...baseEventAttribute } as EventAttribute; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.index !== undefined && object.index !== null) { - message.index = Boolean(object.index); - } else { - message.index = false; - } - return message; - }, - - toJSON(message: EventAttribute): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.index !== undefined && (obj.index = message.index); - return obj; - }, - - fromPartial(object: DeepPartial): EventAttribute { - const message = { ...baseEventAttribute } as EventAttribute; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = false; - } - return message; - }, -}; - -const baseTxResult: object = { height: 0, index: 0 }; - -export const TxResult = { - encode(message: TxResult, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode( - message.result, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResult } as TxResult; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxResult { - const message = { ...baseTxResult } as TxResult; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: TxResult): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.index !== undefined && (obj.index = message.index); - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - message.result !== undefined && - (obj.result = message.result - ? ResponseDeliverTx.toJSON(message.result) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxResult { - const message = { ...baseTxResult } as TxResult; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseValidator: object = { power: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 3: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -const baseValidatorUpdate: object = { power: 0 }; - -export const ValidatorUpdate = { - encode(message: ValidatorUpdate, writer: Writer = Writer.create()): Writer { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorUpdate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorUpdate { - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: ValidatorUpdate): unknown { - const obj: any = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorUpdate { - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -const baseVoteInfo: object = { signedLastBlock: false }; - -export const VoteInfo = { - encode(message: VoteInfo, writer: Writer = Writer.create()): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VoteInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVoteInfo } as VoteInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VoteInfo { - const message = { ...baseVoteInfo } as VoteInfo; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if ( - object.signedLastBlock !== undefined && - object.signedLastBlock !== null - ) { - message.signedLastBlock = Boolean(object.signedLastBlock); - } else { - message.signedLastBlock = false; - } - return message; - }, - - toJSON(message: VoteInfo): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.signedLastBlock !== undefined && - (obj.signedLastBlock = message.signedLastBlock); - return obj; - }, - - fromPartial(object: DeepPartial): VoteInfo { - const message = { ...baseVoteInfo } as VoteInfo; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if ( - object.signedLastBlock !== undefined && - object.signedLastBlock !== null - ) { - message.signedLastBlock = object.signedLastBlock; - } else { - message.signedLastBlock = false; - } - return message; - }, -}; - -const baseEvidence: object = { type: 0, height: 0, totalVotingPower: 0 }; - -export const Evidence = { - encode(message: Evidence, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(40).int64(message.totalVotingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Evidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence } as Evidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.totalVotingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Evidence { - const message = { ...baseEvidence } as Evidence; - if (object.type !== undefined && object.type !== null) { - message.type = evidenceTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = Number(object.totalVotingPower); - } else { - message.totalVotingPower = 0; - } - return message; - }, - - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - - fromPartial(object: DeepPartial): Evidence { - const message = { ...baseEvidence } as Evidence; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = object.totalVotingPower; - } else { - message.totalVotingPower = 0; - } - return message; - }, -}; - -const baseSnapshot: object = { height: 0, format: 0, chunks: 0 }; - -export const Snapshot = { - encode(message: Snapshot, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Snapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshot } as Snapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Snapshot { - const message = { ...baseSnapshot } as Snapshot; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = Number(object.chunks); - } else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = bytesFromBase64(object.metadata); - } - return message; - }, - - toJSON(message: Snapshot): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunks !== undefined && (obj.chunks = message.chunks); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.metadata !== undefined && - (obj.metadata = base64FromBytes( - message.metadata !== undefined ? message.metadata : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Snapshot { - const message = { ...baseSnapshot } as Snapshot; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = object.chunks; - } else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = object.metadata; - } else { - message.metadata = new Uint8Array(); - } - return message; - }, -}; - -export interface ABCIApplication { - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk( - request: RequestLoadSnapshotChunk - ): Promise; - ApplySnapshotChunk( - request: RequestApplySnapshotChunk - ): Promise; -} - -export class ABCIApplicationClientImpl implements ABCIApplication { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Echo(request: RequestEcho): Promise { - const data = RequestEcho.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Echo", - data - ); - return promise.then((data) => ResponseEcho.decode(new Reader(data))); - } - - Flush(request: RequestFlush): Promise { - const data = RequestFlush.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Flush", - data - ); - return promise.then((data) => ResponseFlush.decode(new Reader(data))); - } - - Info(request: RequestInfo): Promise { - const data = RequestInfo.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Info", - data - ); - return promise.then((data) => ResponseInfo.decode(new Reader(data))); - } - - SetOption(request: RequestSetOption): Promise { - const data = RequestSetOption.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "SetOption", - data - ); - return promise.then((data) => ResponseSetOption.decode(new Reader(data))); - } - - DeliverTx(request: RequestDeliverTx): Promise { - const data = RequestDeliverTx.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "DeliverTx", - data - ); - return promise.then((data) => ResponseDeliverTx.decode(new Reader(data))); - } - - CheckTx(request: RequestCheckTx): Promise { - const data = RequestCheckTx.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "CheckTx", - data - ); - return promise.then((data) => ResponseCheckTx.decode(new Reader(data))); - } - - Query(request: RequestQuery): Promise { - const data = RequestQuery.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Query", - data - ); - return promise.then((data) => ResponseQuery.decode(new Reader(data))); - } - - Commit(request: RequestCommit): Promise { - const data = RequestCommit.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Commit", - data - ); - return promise.then((data) => ResponseCommit.decode(new Reader(data))); - } - - InitChain(request: RequestInitChain): Promise { - const data = RequestInitChain.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "InitChain", - data - ); - return promise.then((data) => ResponseInitChain.decode(new Reader(data))); - } - - BeginBlock(request: RequestBeginBlock): Promise { - const data = RequestBeginBlock.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "BeginBlock", - data - ); - return promise.then((data) => ResponseBeginBlock.decode(new Reader(data))); - } - - EndBlock(request: RequestEndBlock): Promise { - const data = RequestEndBlock.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "EndBlock", - data - ); - return promise.then((data) => ResponseEndBlock.decode(new Reader(data))); - } - - ListSnapshots(request: RequestListSnapshots): Promise { - const data = RequestListSnapshots.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "ListSnapshots", - data - ); - return promise.then((data) => - ResponseListSnapshots.decode(new Reader(data)) - ); - } - - OfferSnapshot(request: RequestOfferSnapshot): Promise { - const data = RequestOfferSnapshot.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "OfferSnapshot", - data - ); - return promise.then((data) => - ResponseOfferSnapshot.decode(new Reader(data)) - ); - } - - LoadSnapshotChunk( - request: RequestLoadSnapshotChunk - ): Promise { - const data = RequestLoadSnapshotChunk.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "LoadSnapshotChunk", - data - ); - return promise.then((data) => - ResponseLoadSnapshotChunk.decode(new Reader(data)) - ); - } - - ApplySnapshotChunk( - request: RequestApplySnapshotChunk - ): Promise { - const data = RequestApplySnapshotChunk.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "ApplySnapshotChunk", - data - ); - return promise.then((data) => - ResponseApplySnapshotChunk.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.d.ts deleted file mode 100644 index 8fa5bdc..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} -export declare const PublicKey: { - encode(message: PublicKey, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PublicKey; - fromJSON(object: any): PublicKey; - toJSON(message: PublicKey): unknown; - fromPartial(object: DeepPartial): PublicKey; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.js deleted file mode 100644 index bbd03cb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.js +++ /dev/null @@ -1,105 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const basePublicKey = {}; -export const PublicKey = { - encode(message, writer = Writer.create()) { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } - else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } - else { - message.secp256k1 = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.ts deleted file mode 100644 index 450db2a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/keys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} - -const basePublicKey: object = {}; - -export const PublicKey = { - encode(message: PublicKey, writer: Writer = Writer.create()): Writer { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey } as PublicKey; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } else { - message.secp256k1 = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.d.ts deleted file mode 100644 index fd48f83..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} -export interface DominoOp { - key: string; - input: string; - output: string; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} -export declare const Proof: { - encode(message: Proof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proof; - fromJSON(object: any): Proof; - toJSON(message: Proof): unknown; - fromPartial(object: DeepPartial): Proof; -}; -export declare const ValueOp: { - encode(message: ValueOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValueOp; - fromJSON(object: any): ValueOp; - toJSON(message: ValueOp): unknown; - fromPartial(object: DeepPartial): ValueOp; -}; -export declare const DominoOp: { - encode(message: DominoOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DominoOp; - fromJSON(object: any): DominoOp; - toJSON(message: DominoOp): unknown; - fromPartial(object: DeepPartial): DominoOp; -}; -export declare const ProofOp: { - encode(message: ProofOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOp; - fromJSON(object: any): ProofOp; - toJSON(message: ProofOp): unknown; - fromPartial(object: DeepPartial): ProofOp; -}; -export declare const ProofOps: { - encode(message: ProofOps, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOps; - fromJSON(object: any): ProofOps; - toJSON(message: ProofOps): unknown; - fromPartial(object: DeepPartial): ProofOps; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.js deleted file mode 100644 index 240e074..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.js +++ /dev/null @@ -1,456 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const baseProof = { total: 0, index: 0 }; -export const Proof = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof }; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64()); - break; - case 2: - message.index = longToNumber(reader.int64()); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array())); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.aunts = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } - else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; -const baseValueOp = {}; -export const ValueOp = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseDominoOp = { key: "", input: "", output: "" }; -export const DominoOp = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } - else { - message.output = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - fromPartial(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } - else { - message.output = ""; - } - return message; - }, -}; -const baseProofOp = { type: "" }; -export const ProofOp = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseProofOps = {}; -export const ProofOps = { - encode(message, writer = Writer.create()) { - for (const v of message.ops) { - ProofOp.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps }; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } - else { - obj.ops = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.ts deleted file mode 100644 index dae5160..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/crypto/proof.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} - -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} - -export interface DominoOp { - key: string; - input: string; - output: string; -} - -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} - -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} - -const baseProof: object = { total: 0, index: 0 }; - -export const Proof = { - encode(message: Proof, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof } as Proof; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = longToNumber(reader.int64() as Long); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes( - message.leafHash !== undefined ? message.leafHash : new Uint8Array() - )); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.aunts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; - -const baseValueOp: object = {}; - -export const ValueOp = { - encode(message: ValueOp, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp } as ValueOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseDominoOp: object = { key: "", input: "", output: "" }; - -export const DominoOp = { - encode(message: DominoOp, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp } as DominoOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } else { - message.output = ""; - } - return message; - }, - - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - - fromPartial(object: DeepPartial): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } else { - message.output = ""; - } - return message; - }, -}; - -const baseProofOp: object = { type: "" }; - -export const ProofOp = { - encode(message: ProofOp, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp } as ProofOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseProofOps: object = {}; - -export const ProofOps = { - encode(message: ProofOps, writer: Writer = Writer.create()): Writer { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } else { - obj.ops = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.d.ts deleted file mode 100644 index f500a7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; -export declare const protobufPackage = "tendermint.types"; -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - maxBytes: number; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - maxGas: number; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - timeIotaMs: number; -} -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - maxAgeNumBlocks: number; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - maxAgeDuration: Duration | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - maxBytes: number; -} -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pubKeyTypes: string[]; -} -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - appVersion: number; -} -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - blockMaxBytes: number; - blockMaxGas: number; -} -export declare const ConsensusParams: { - encode(message: ConsensusParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusParams; - fromJSON(object: any): ConsensusParams; - toJSON(message: ConsensusParams): unknown; - fromPartial(object: DeepPartial): ConsensusParams; -}; -export declare const BlockParams: { - encode(message: BlockParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockParams; - fromJSON(object: any): BlockParams; - toJSON(message: BlockParams): unknown; - fromPartial(object: DeepPartial): BlockParams; -}; -export declare const EvidenceParams: { - encode(message: EvidenceParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EvidenceParams; - fromJSON(object: any): EvidenceParams; - toJSON(message: EvidenceParams): unknown; - fromPartial(object: DeepPartial): EvidenceParams; -}; -export declare const ValidatorParams: { - encode(message: ValidatorParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorParams; - fromJSON(object: any): ValidatorParams; - toJSON(message: ValidatorParams): unknown; - fromPartial(object: DeepPartial): ValidatorParams; -}; -export declare const VersionParams: { - encode(message: VersionParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VersionParams; - fromJSON(object: any): VersionParams; - toJSON(message: VersionParams): unknown; - fromPartial(object: DeepPartial): VersionParams; -}; -export declare const HashedParams: { - encode(message: HashedParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HashedParams; - fromJSON(object: any): HashedParams; - toJSON(message: HashedParams): unknown; - fromPartial(object: DeepPartial): HashedParams; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.js deleted file mode 100644 index 5ebc3d6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.js +++ /dev/null @@ -1,510 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; -export const protobufPackage = "tendermint.types"; -const baseConsensusParams = {}; -export const ConsensusParams = { - encode(message, writer = Writer.create()) { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } - else { - message.version = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } - else { - message.version = undefined; - } - return message; - }, -}; -const baseBlockParams = { maxBytes: 0, maxGas: 0, timeIotaMs: 0 }; -export const BlockParams = { - encode(message, writer = Writer.create()) { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - if (message.timeIotaMs !== 0) { - writer.uint32(24).int64(message.timeIotaMs); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64()); - break; - case 2: - message.maxGas = longToNumber(reader.int64()); - break; - case 3: - message.timeIotaMs = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } - else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = Number(object.timeIotaMs); - } - else { - message.timeIotaMs = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - message.timeIotaMs !== undefined && (obj.timeIotaMs = message.timeIotaMs); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } - else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = object.timeIotaMs; - } - else { - message.timeIotaMs = 0; - } - return message; - }, -}; -const baseEvidenceParams = { maxAgeNumBlocks: 0, maxBytes: 0 }; -export const EvidenceParams = { - encode(message, writer = Writer.create()) { - if (message.maxAgeNumBlocks !== 0) { - writer.uint32(8).int64(message.maxAgeNumBlocks); - } - if (message.maxAgeDuration !== undefined) { - Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim(); - } - if (message.maxBytes !== 0) { - writer.uint32(24).int64(message.maxBytes); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = longToNumber(reader.int64()); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEvidenceParams }; - if (object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null) { - message.maxAgeNumBlocks = Number(object.maxAgeNumBlocks); - } - else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromJSON(object.maxAgeDuration); - } - else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } - else { - message.maxBytes = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxAgeNumBlocks !== undefined && - (obj.maxAgeNumBlocks = message.maxAgeNumBlocks); - message.maxAgeDuration !== undefined && - (obj.maxAgeDuration = message.maxAgeDuration - ? Duration.toJSON(message.maxAgeDuration) - : undefined); - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - return obj; - }, - fromPartial(object) { - const message = { ...baseEvidenceParams }; - if (object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null) { - message.maxAgeNumBlocks = object.maxAgeNumBlocks; - } - else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromPartial(object.maxAgeDuration); - } - else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } - else { - message.maxBytes = 0; - } - return message; - }, -}; -const baseValidatorParams = { pubKeyTypes: "" }; -export const ValidatorParams = { - encode(message, writer = Writer.create()) { - for (const v of message.pubKeyTypes) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorParams }; - message.pubKeyTypes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorParams }; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pubKeyTypes) { - obj.pubKeyTypes = message.pubKeyTypes.map((e) => e); - } - else { - obj.pubKeyTypes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorParams }; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(e); - } - } - return message; - }, -}; -const baseVersionParams = { appVersion: 0 }; -export const VersionParams = { - encode(message, writer = Writer.create()) { - if (message.appVersion !== 0) { - writer.uint32(8).uint64(message.appVersion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersionParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appVersion = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVersionParams }; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } - else { - message.appVersion = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - return obj; - }, - fromPartial(object) { - const message = { ...baseVersionParams }; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } - else { - message.appVersion = 0; - } - return message; - }, -}; -const baseHashedParams = { blockMaxBytes: 0, blockMaxGas: 0 }; -export const HashedParams = { - encode(message, writer = Writer.create()) { - if (message.blockMaxBytes !== 0) { - writer.uint32(8).int64(message.blockMaxBytes); - } - if (message.blockMaxGas !== 0) { - writer.uint32(16).int64(message.blockMaxGas); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHashedParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockMaxBytes = longToNumber(reader.int64()); - break; - case 2: - message.blockMaxGas = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHashedParams }; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = Number(object.blockMaxBytes); - } - else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = Number(object.blockMaxGas); - } - else { - message.blockMaxGas = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockMaxBytes !== undefined && - (obj.blockMaxBytes = message.blockMaxBytes); - message.blockMaxGas !== undefined && - (obj.blockMaxGas = message.blockMaxGas); - return obj; - }, - fromPartial(object) { - const message = { ...baseHashedParams }; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = object.blockMaxBytes; - } - else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = object.blockMaxGas; - } - else { - message.blockMaxGas = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.ts deleted file mode 100644 index eaa1846..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/params.ts +++ /dev/null @@ -1,625 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; - -export const protobufPackage = "tendermint.types"; - -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} - -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - maxBytes: number; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - maxGas: number; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - timeIotaMs: number; -} - -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - maxAgeNumBlocks: number; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - maxAgeDuration: Duration | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - maxBytes: number; -} - -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pubKeyTypes: string[]; -} - -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - appVersion: number; -} - -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - blockMaxBytes: number; - blockMaxGas: number; -} - -const baseConsensusParams: object = {}; - -export const ConsensusParams = { - encode(message: ConsensusParams, writer: Writer = Writer.create()): Writer { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode( - message.evidence, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode( - message.validator, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams } as ConsensusParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } else { - message.version = undefined; - } - return message; - }, - - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } else { - message.version = undefined; - } - return message; - }, -}; - -const baseBlockParams: object = { maxBytes: 0, maxGas: 0, timeIotaMs: 0 }; - -export const BlockParams = { - encode(message: BlockParams, writer: Writer = Writer.create()): Writer { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - if (message.timeIotaMs !== 0) { - writer.uint32(24).int64(message.timeIotaMs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams } as BlockParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.maxGas = longToNumber(reader.int64() as Long); - break; - case 3: - message.timeIotaMs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = Number(object.timeIotaMs); - } else { - message.timeIotaMs = 0; - } - return message; - }, - - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - message.timeIotaMs !== undefined && (obj.timeIotaMs = message.timeIotaMs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = object.timeIotaMs; - } else { - message.timeIotaMs = 0; - } - return message; - }, -}; - -const baseEvidenceParams: object = { maxAgeNumBlocks: 0, maxBytes: 0 }; - -export const EvidenceParams = { - encode(message: EvidenceParams, writer: Writer = Writer.create()): Writer { - if (message.maxAgeNumBlocks !== 0) { - writer.uint32(8).int64(message.maxAgeNumBlocks); - } - if (message.maxAgeDuration !== undefined) { - Duration.encode( - message.maxAgeDuration, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.maxBytes !== 0) { - writer.uint32(24).int64(message.maxBytes); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EvidenceParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceParams } as EvidenceParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = longToNumber(reader.int64() as Long); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EvidenceParams { - const message = { ...baseEvidenceParams } as EvidenceParams; - if ( - object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null - ) { - message.maxAgeNumBlocks = Number(object.maxAgeNumBlocks); - } else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromJSON(object.maxAgeDuration); - } else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } else { - message.maxBytes = 0; - } - return message; - }, - - toJSON(message: EvidenceParams): unknown { - const obj: any = {}; - message.maxAgeNumBlocks !== undefined && - (obj.maxAgeNumBlocks = message.maxAgeNumBlocks); - message.maxAgeDuration !== undefined && - (obj.maxAgeDuration = message.maxAgeDuration - ? Duration.toJSON(message.maxAgeDuration) - : undefined); - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - return obj; - }, - - fromPartial(object: DeepPartial): EvidenceParams { - const message = { ...baseEvidenceParams } as EvidenceParams; - if ( - object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null - ) { - message.maxAgeNumBlocks = object.maxAgeNumBlocks; - } else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromPartial(object.maxAgeDuration); - } else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } else { - message.maxBytes = 0; - } - return message; - }, -}; - -const baseValidatorParams: object = { pubKeyTypes: "" }; - -export const ValidatorParams = { - encode(message: ValidatorParams, writer: Writer = Writer.create()): Writer { - for (const v of message.pubKeyTypes) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorParams } as ValidatorParams; - message.pubKeyTypes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorParams { - const message = { ...baseValidatorParams } as ValidatorParams; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(String(e)); - } - } - return message; - }, - - toJSON(message: ValidatorParams): unknown { - const obj: any = {}; - if (message.pubKeyTypes) { - obj.pubKeyTypes = message.pubKeyTypes.map((e) => e); - } else { - obj.pubKeyTypes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorParams { - const message = { ...baseValidatorParams } as ValidatorParams; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(e); - } - } - return message; - }, -}; - -const baseVersionParams: object = { appVersion: 0 }; - -export const VersionParams = { - encode(message: VersionParams, writer: Writer = Writer.create()): Writer { - if (message.appVersion !== 0) { - writer.uint32(8).uint64(message.appVersion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VersionParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersionParams } as VersionParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appVersion = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VersionParams { - const message = { ...baseVersionParams } as VersionParams; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } else { - message.appVersion = 0; - } - return message; - }, - - toJSON(message: VersionParams): unknown { - const obj: any = {}; - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - return obj; - }, - - fromPartial(object: DeepPartial): VersionParams { - const message = { ...baseVersionParams } as VersionParams; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } else { - message.appVersion = 0; - } - return message; - }, -}; - -const baseHashedParams: object = { blockMaxBytes: 0, blockMaxGas: 0 }; - -export const HashedParams = { - encode(message: HashedParams, writer: Writer = Writer.create()): Writer { - if (message.blockMaxBytes !== 0) { - writer.uint32(8).int64(message.blockMaxBytes); - } - if (message.blockMaxGas !== 0) { - writer.uint32(16).int64(message.blockMaxGas); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HashedParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHashedParams } as HashedParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockMaxBytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.blockMaxGas = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HashedParams { - const message = { ...baseHashedParams } as HashedParams; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = Number(object.blockMaxBytes); - } else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = Number(object.blockMaxGas); - } else { - message.blockMaxGas = 0; - } - return message; - }, - - toJSON(message: HashedParams): unknown { - const obj: any = {}; - message.blockMaxBytes !== undefined && - (obj.blockMaxBytes = message.blockMaxBytes); - message.blockMaxGas !== undefined && - (obj.blockMaxGas = message.blockMaxGas); - return obj; - }, - - fromPartial(object: DeepPartial): HashedParams { - const message = { ...baseHashedParams } as HashedParams; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = object.blockMaxBytes; - } else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = object.blockMaxGas; - } else { - message.blockMaxGas = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.d.ts deleted file mode 100644 index 52af8f2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export declare const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export declare enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1 -} -export declare function blockIDFlagFromJSON(object: any): BlockIDFlag; -export declare function blockIDFlagToJSON(object: BlockIDFlag): string; -/** SignedMsgType is a type of signed message in the consensus. */ -export declare enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1 -} -export declare function signedMsgTypeFromJSON(object: any): SignedMsgType; -export declare function signedMsgTypeToJSON(object: SignedMsgType): string; -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * Txs that will be applied by state @ block.Height+1. - * NOTE: not all txs here are valid. We're just agreeing on the order first. - * This means that block.AppHash does not include these txs. - */ - txs: Uint8Array[]; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} -export declare const PartSetHeader: { - encode(message: PartSetHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PartSetHeader; - fromJSON(object: any): PartSetHeader; - toJSON(message: PartSetHeader): unknown; - fromPartial(object: DeepPartial): PartSetHeader; -}; -export declare const Part: { - encode(message: Part, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Part; - fromJSON(object: any): Part; - toJSON(message: Part): unknown; - fromPartial(object: DeepPartial): Part; -}; -export declare const BlockID: { - encode(message: BlockID, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockID; - fromJSON(object: any): BlockID; - toJSON(message: BlockID): unknown; - fromPartial(object: DeepPartial): BlockID; -}; -export declare const Header: { - encode(message: Header, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Header; - fromJSON(object: any): Header; - toJSON(message: Header): unknown; - fromPartial(object: DeepPartial
): Header; -}; -export declare const Data: { - encode(message: Data, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Data; - fromJSON(object: any): Data; - toJSON(message: Data): unknown; - fromPartial(object: DeepPartial): Data; -}; -export declare const Vote: { - encode(message: Vote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Vote; - fromJSON(object: any): Vote; - toJSON(message: Vote): unknown; - fromPartial(object: DeepPartial): Vote; -}; -export declare const Commit: { - encode(message: Commit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Commit; - fromJSON(object: any): Commit; - toJSON(message: Commit): unknown; - fromPartial(object: DeepPartial): Commit; -}; -export declare const CommitSig: { - encode(message: CommitSig, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommitSig; - fromJSON(object: any): CommitSig; - toJSON(message: CommitSig): unknown; - fromPartial(object: DeepPartial): CommitSig; -}; -export declare const Proposal: { - encode(message: Proposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proposal; - fromJSON(object: any): Proposal; - toJSON(message: Proposal): unknown; - fromPartial(object: DeepPartial): Proposal; -}; -export declare const SignedHeader: { - encode(message: SignedHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SignedHeader; - fromJSON(object: any): SignedHeader; - toJSON(message: SignedHeader): unknown; - fromPartial(object: DeepPartial): SignedHeader; -}; -export declare const LightBlock: { - encode(message: LightBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LightBlock; - fromJSON(object: any): LightBlock; - toJSON(message: LightBlock): unknown; - fromPartial(object: DeepPartial): LightBlock; -}; -export declare const BlockMeta: { - encode(message: BlockMeta, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockMeta; - fromJSON(object: any): BlockMeta; - toJSON(message: BlockMeta): unknown; - fromPartial(object: DeepPartial): BlockMeta; -}; -export declare const TxProof: { - encode(message: TxProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxProof; - fromJSON(object: any): TxProof; - toJSON(message: TxProof): unknown; - fromPartial(object: DeepPartial): TxProof; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.js deleted file mode 100644 index 2eb6d87..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.js +++ /dev/null @@ -1,1689 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export var BlockIDFlag; -(function (BlockIDFlag) { - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_UNKNOWN"] = 0] = "BLOCK_ID_FLAG_UNKNOWN"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_ABSENT"] = 1] = "BLOCK_ID_FLAG_ABSENT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_COMMIT"] = 2] = "BLOCK_ID_FLAG_COMMIT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_NIL"] = 3] = "BLOCK_ID_FLAG_NIL"; - BlockIDFlag[BlockIDFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(BlockIDFlag || (BlockIDFlag = {})); -export function blockIDFlagFromJSON(object) { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} -export function blockIDFlagToJSON(object) { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} -/** SignedMsgType is a type of signed message in the consensus. */ -export var SignedMsgType; -(function (SignedMsgType) { - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_UNKNOWN"] = 0] = "SIGNED_MSG_TYPE_UNKNOWN"; - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PREVOTE"] = 1] = "SIGNED_MSG_TYPE_PREVOTE"; - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PRECOMMIT"] = 2] = "SIGNED_MSG_TYPE_PRECOMMIT"; - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PROPOSAL"] = 32] = "SIGNED_MSG_TYPE_PROPOSAL"; - SignedMsgType[SignedMsgType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(SignedMsgType || (SignedMsgType = {})); -export function signedMsgTypeFromJSON(object) { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} -export function signedMsgTypeToJSON(object) { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} -const basePartSetHeader = { total: 0 }; -export const PartSetHeader = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -const basePart = { index: 0 }; -export const Part = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } - else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseBlockID = {}; -export const BlockID = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, -}; -const baseHeader = { chainId: "", height: 0 }; -export const Header = { - encode(message, writer = Writer.create()) { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes(message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array())); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes(message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array())); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array())); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes(message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array())); - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes(message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array())); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array())); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } - else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } - else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } - else { - message.validatorsHash = new Uint8Array(); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = object.nextValidatorsHash; - } - else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } - else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = object.lastResultsHash; - } - else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } - else { - message.evidenceHash = new Uint8Array(); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = object.proposerAddress; - } - else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; -const baseData = {}; -export const Data = { - encode(message, writer = Writer.create()) { - for (const v of message.txs) { - writer.uint32(10).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData }; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.txs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; -const baseVote = { type: 0, height: 0, round: 0, validatorIndex: 0 }; -export const Vote = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseCommit = { height: 0, round: 0 }; -export const Commit = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit }; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => e ? CommitSig.toJSON(e) : undefined); - } - else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommitSig = { blockIdFlag: 0 }; -export const CommitSig = { - encode(message, writer = Writer.create()) { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32(); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseProposal = { type: 0, height: 0, round: 0, polRound: 0 }; -export const Proposal = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseSignedHeader = {}; -export const SignedHeader = { - encode(message, writer = Writer.create()) { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, -}; -const baseLightBlock = {}; -export const LightBlock = { - encode(message, writer = Writer.create()) { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, -}; -const baseBlockMeta = { blockSize: 0, numTxs: 0 }; -export const BlockMeta = { - encode(message, writer = Writer.create()) { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64()); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } - else { - message.numTxs = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } - else { - message.numTxs = 0; - } - return message; - }, -}; -const baseTxProof = {}; -export const TxProof = { - encode(message, writer = Writer.create()) { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } - else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.ts deleted file mode 100644 index a4bef0b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/types.ts +++ /dev/null @@ -1,1912 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} - -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} - -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} - -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} - -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} - -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} - -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} - -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} - -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} - -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} - -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * Txs that will be applied by state @ block.Height+1. - * NOTE: not all txs here are valid. We're just agreeing on the order first. - * This means that block.AppHash does not include these txs. - */ - txs: Uint8Array[]; -} - -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} - -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} - -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} - -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} - -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} - -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} - -const basePartSetHeader: object = { total: 0 }; - -export const PartSetHeader = { - encode(message: PartSetHeader, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader } as PartSetHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const basePart: object = { index: 0 }; - -export const Part = { - encode(message: Part, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Part { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart } as Part; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes( - message.bytes !== undefined ? message.bytes : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseBlockID: object = {}; - -export const BlockID = { - encode(message: BlockID, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode( - message.partSetHeader, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockID { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID } as BlockID; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } else { - message.partSetHeader = undefined; - } - return message; - }, - - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } else { - message.partSetHeader = undefined; - } - return message; - }, -}; - -const baseHeader: object = { chainId: "", height: 0 }; - -export const Header = { - encode(message: Header, writer: Writer = Writer.create()): Writer { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Header { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader } as Header; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if ( - object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null - ) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if ( - object.lastResultsHash !== undefined && - object.lastResultsHash !== null - ) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if ( - object.proposerAddress !== undefined && - object.proposerAddress !== null - ) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes( - message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array() - )); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes( - message.dataHash !== undefined ? message.dataHash : new Uint8Array() - )); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes( - message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array() - )); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes( - message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array() - )); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes( - message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array() - )); - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes( - message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array() - )); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes( - message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array() - )); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes( - message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial
): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } else { - message.validatorsHash = new Uint8Array(); - } - if ( - object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null - ) { - message.nextValidatorsHash = object.nextValidatorsHash; - } else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - if ( - object.lastResultsHash !== undefined && - object.lastResultsHash !== null - ) { - message.lastResultsHash = object.lastResultsHash; - } else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } else { - message.evidenceHash = new Uint8Array(); - } - if ( - object.proposerAddress !== undefined && - object.proposerAddress !== null - ) { - message.proposerAddress = object.proposerAddress; - } else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; - -const baseData: object = {}; - -export const Data = { - encode(message: Data, writer: Writer = Writer.create()): Writer { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData } as Data; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; - -const baseVote: object = { type: 0, height: 0, round: 0, validatorIndex: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes( - message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array() - )); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseCommit: object = { height: 0, round: 0 }; - -export const Commit = { - encode(message: Commit, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit } as Commit; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? CommitSig.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommitSig: object = { blockIdFlag: 0 }; - -export const CommitSig = { - encode(message: CommitSig, writer: Writer = Writer.create()): Writer { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(26).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig } as CommitSig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32() as any; - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } else { - message.blockIdFlag = 0; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes( - message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array() - )); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } else { - message.blockIdFlag = 0; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseProposal: object = { type: 0, height: 0, round: 0, polRound: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignedHeader: object = {}; - -export const SignedHeader = { - encode(message: SignedHeader, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader } as SignedHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - return message; - }, - - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - return message; - }, -}; - -const baseLightBlock: object = {}; - -export const LightBlock = { - encode(message: LightBlock, writer: Writer = Writer.create()): Writer { - if (message.signedHeader !== undefined) { - SignedHeader.encode( - message.signedHeader, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode( - message.validatorSet, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock } as LightBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } else { - message.validatorSet = undefined; - } - return message; - }, - - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } else { - message.validatorSet = undefined; - } - return message; - }, -}; - -const baseBlockMeta: object = { blockSize: 0, numTxs: 0 }; - -export const BlockMeta = { - encode(message: BlockMeta, writer: Writer = Writer.create()): Writer { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta } as BlockMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64() as Long); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } else { - message.numTxs = 0; - } - return message; - }, - - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } else { - message.numTxs = 0; - } - return message; - }, -}; - -const baseTxProof: object = {}; - -export const TxProof = { - encode(message: TxProof, writer: Writer = Writer.create()): Writer { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof } as TxProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes( - message.rootHash !== undefined ? message.rootHash : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.d.ts deleted file mode 100644 index 0654161..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export declare const protobufPackage = "tendermint.types"; -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} -export declare const ValidatorSet: { - encode(message: ValidatorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSet; - fromJSON(object: any): ValidatorSet; - toJSON(message: ValidatorSet): unknown; - fromPartial(object: DeepPartial): ValidatorSet; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const SimpleValidator: { - encode(message: SimpleValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SimpleValidator; - fromJSON(object: any): SimpleValidator; - toJSON(message: SimpleValidator): unknown; - fromPartial(object: DeepPartial): SimpleValidator; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.js deleted file mode 100644 index 1bd1e4f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.js +++ /dev/null @@ -1,333 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export const protobufPackage = "tendermint.types"; -const baseValidatorSet = { totalVotingPower: 0 }; -export const ValidatorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = Number(object.totalVotingPower); - } - else { - message.totalVotingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = object.totalVotingPower; - } - else { - message.totalVotingPower = 0; - } - return message; - }, -}; -const baseValidator = { votingPower: 0, proposerPriority: 0 }; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64()); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = Number(object.proposerPriority); - } - else { - message.proposerPriority = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && - (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = object.proposerPriority; - } - else { - message.proposerPriority = 0; - } - return message; - }, -}; -const baseSimpleValidator = { votingPower: 0 }; -export const SimpleValidator = { - encode(message, writer = Writer.create()) { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.ts deleted file mode 100644 index c504403..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/types/validator.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.types"; - -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} - -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} - -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} - -const baseValidatorSet: object = { totalVotingPower: 0 }; - -export const ValidatorSet = { - encode(message: ValidatorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = Number(object.totalVotingPower); - } else { - message.totalVotingPower = 0; - } - return message; - }, - - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = object.totalVotingPower; - } else { - message.totalVotingPower = 0; - } - return message; - }, -}; - -const baseValidator: object = { votingPower: 0, proposerPriority: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } else { - message.votingPower = 0; - } - if ( - object.proposerPriority !== undefined && - object.proposerPriority !== null - ) { - message.proposerPriority = Number(object.proposerPriority); - } else { - message.proposerPriority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } else { - message.votingPower = 0; - } - if ( - object.proposerPriority !== undefined && - object.proposerPriority !== null - ) { - message.proposerPriority = object.proposerPriority; - } else { - message.proposerPriority = 0; - } - return message; - }, -}; - -const baseSimpleValidator: object = { votingPower: 0 }; - -export const SimpleValidator = { - encode(message: SimpleValidator, writer: Writer = Writer.create()): Writer { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator } as SimpleValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } else { - message.votingPower = 0; - } - return message; - }, - - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - - fromPartial(object: DeepPartial): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } else { - message.votingPower = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.d.ts deleted file mode 100644 index 3158f17..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.version"; -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface Consensus { - block: number; - app: number; -} -export declare const App: { - encode(message: App, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): App; - fromJSON(object: any): App; - toJSON(message: App): unknown; - fromPartial(object: DeepPartial): App; -}; -export declare const Consensus: { - encode(message: Consensus, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Consensus; - fromJSON(object: any): Consensus; - toJSON(message: Consensus): unknown; - fromPartial(object: DeepPartial): Consensus; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.js deleted file mode 100644 index 39e0693..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.js +++ /dev/null @@ -1,165 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.version"; -const baseApp = { protocol: 0, software: "" }; -export const App = { - encode(message, writer = Writer.create()) { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64()); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } - else { - message.software = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - fromPartial(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } - else { - message.software = ""; - } - return message; - }, -}; -const baseConsensus = { block: 0, app: 0 }; -export const Consensus = { - encode(message, writer = Writer.create()) { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64()); - break; - case 2: - message.app = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } - else { - message.app = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } - else { - message.app = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.ts deleted file mode 100644 index 4bc6ad8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/module/types/tendermint/version/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.version"; - -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} - -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface Consensus { - block: number; - app: number; -} - -const baseApp: object = { protocol: 0, software: "" }; - -export const App = { - encode(message: App, writer: Writer = Writer.create()): Writer { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): App { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp } as App; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64() as Long); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } else { - message.software = ""; - } - return message; - }, - - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - - fromPartial(object: DeepPartial): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } else { - message.software = ""; - } - return message; - }, -}; - -const baseConsensus: object = { block: 0, app: 0 }; - -export const Consensus = { - encode(message: Consensus, writer: Writer = Writer.create()): Writer { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Consensus { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus } as Consensus; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64() as Long); - break; - case 2: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.abci.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.d.ts deleted file mode 100644 index fb143a3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -declare const _default: { - namespaced: boolean; - state: { - _Structure: { - Coin: { - fields: any[]; - }; - DecCoin: { - fields: any[]; - }; - IntProto: { - fields: any[]; - }; - DecProto: { - fields: any[]; - }; - }; - _Subscriptions: Set; - }; - mutations: { - RESET_STATE(state: any): void; - QUERY(state: any, { query, key, value }: { - query: any; - key: any; - value: any; - }): void; - SUBSCRIBE(state: any, subscription: any): void; - UNSUBSCRIBE(state: any, subscription: any): void; - }; - getters: { - getTypeStructure: (state: any) => (type: any) => any; - }; - actions: { - init({ dispatch, rootGetters }: { - dispatch: any; - rootGetters: any; - }): void; - resetState({ commit }: { - commit: any; - }): void; - unsubscribe({ commit }: { - commit: any; - }, subscription: any): void; - StoreUpdate({ state, dispatch }: { - state: any; - dispatch: any; - }): Promise; - }; -}; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.js deleted file mode 100644 index 08fc908..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.js +++ /dev/null @@ -1,82 +0,0 @@ -import { txClient, queryClient } from './module'; -import { Coin } from "./module/types/cosmos/base/v1beta1/coin"; -import { DecCoin } from "./module/types/cosmos/base/v1beta1/coin"; -import { IntProto } from "./module/types/cosmos/base/v1beta1/coin"; -import { DecProto } from "./module/types/cosmos/base/v1beta1/coin"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: { - Coin: getStructure(Coin.fromPartial({})), - DecCoin: getStructure(DecCoin.fromPartial({})), - IntProto: getStructure(IntProto.fromPartial({})), - DecProto: getStructure(DecProto.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.ts deleted file mode 100644 index 6b3cb11..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/index.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { Coin } from "./module/types/cosmos/base/v1beta1/coin" -import { DecCoin } from "./module/types/cosmos/base/v1beta1/coin" -import { IntProto } from "./module/types/cosmos/base/v1beta1/coin" -import { DecProto } from "./module/types/cosmos/base/v1beta1/coin" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - Coin: getStructure(Coin.fromPartial({})), - DecCoin: getStructure(DecCoin.fromPartial({})), - IntProto: getStructure(IntProto.fromPartial({})), - DecProto: getStructure(DecProto.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.d.ts deleted file mode 100644 index 202ebae..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.js deleted file mode 100644 index 15dfd12..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.js +++ /dev/null @@ -1,23 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -const types = []; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.ts deleted file mode 100644 index 2bbbd28..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.d.ts deleted file mode 100644 index 35e76dd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -export interface ProtobufAny { - typeUrl?: string; - /** @format byte */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/base/v1beta1/coin.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.js deleted file mode 100644 index 8f7e49b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/base/v1beta1/coin.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.ts deleted file mode 100644 index 6d07bfe..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/rest.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - typeUrl?: string; - - /** @format byte */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/base/v1beta1/coin.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js deleted file mode 100644 index 0b48c38..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js +++ /dev/null @@ -1,105 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: {}, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async sendMsgVerifyInvariant({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVerifyInvariant(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgVerifyInvariant({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVerifyInvariant(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts deleted file mode 100644 index 1445ca5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - - async sendMsgVerifyInvariant({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVerifyInvariant(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgVerifyInvariant:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgVerifyInvariant({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVerifyInvariant(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgVerifyInvariant:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts deleted file mode 100644 index 0e39bea..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgVerifyInvariant: (data: MsgVerifyInvariant) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js deleted file mode 100644 index 8babb43..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; -const types = [ - ["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgVerifyInvariant: (data) => ({ typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts deleted file mode 100644 index d44cd08..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; - - -const types = [ - ["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgVerifyInvariant: (data: MsgVerifyInvariant): EncodeObject => ({ typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts deleted file mode 100644 index cf33680..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -export interface ProtobufAny { - typeUrl?: string; - /** @format byte */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** - * MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. - */ -export declare type V1Beta1MsgVerifyInvariantResponse = object; -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/crisis/v1beta1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js deleted file mode 100644 index 8946f49..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/crisis/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts deleted file mode 100644 index f2edd9a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts +++ /dev/null @@ -1,226 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - typeUrl?: string; - - /** @format byte */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** - * MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. - */ -export type V1Beta1MsgVerifyInvariantResponse = object; - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/crisis/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts deleted file mode 100644 index daee179..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.crisis.v1beta1"; -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisState { - /** - * constant_fee is the fee used to verify the invariant in the crisis - * module. - */ - constantFee: Coin | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js deleted file mode 100644 index f9c1515..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.crisis.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.constantFee !== undefined) { - Coin.encode(message.constantFee, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.constantFee = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - if (object.constantFee !== undefined && object.constantFee !== null) { - message.constantFee = Coin.fromJSON(object.constantFee); - } - else { - message.constantFee = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.constantFee !== undefined && - (obj.constantFee = message.constantFee - ? Coin.toJSON(message.constantFee) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - if (object.constantFee !== undefined && object.constantFee !== null) { - message.constantFee = Coin.fromPartial(object.constantFee); - } - else { - message.constantFee = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts deleted file mode 100644 index 603198a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.crisis.v1beta1"; - -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisState { - /** - * constant_fee is the fee used to verify the invariant in the crisis - * module. - */ - constantFee: Coin | undefined; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.constantFee !== undefined) { - Coin.encode(message.constantFee, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.constantFee = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.constantFee !== undefined && object.constantFee !== null) { - message.constantFee = Coin.fromJSON(object.constantFee); - } else { - message.constantFee = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.constantFee !== undefined && - (obj.constantFee = message.constantFee - ? Coin.toJSON(message.constantFee) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.constantFee !== undefined && object.constantFee !== null) { - message.constantFee = Coin.fromPartial(object.constantFee); - } else { - message.constantFee = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts deleted file mode 100644 index 9d8968b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.crisis.v1beta1"; -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariant { - sender: string; - invariantModuleName: string; - invariantRoute: string; -} -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponse { -} -export declare const MsgVerifyInvariant: { - encode(message: MsgVerifyInvariant, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVerifyInvariant; - fromJSON(object: any): MsgVerifyInvariant; - toJSON(message: MsgVerifyInvariant): unknown; - fromPartial(object: DeepPartial): MsgVerifyInvariant; -}; -export declare const MsgVerifyInvariantResponse: { - encode(_: MsgVerifyInvariantResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVerifyInvariantResponse; - fromJSON(_: any): MsgVerifyInvariantResponse; - toJSON(_: MsgVerifyInvariantResponse): unknown; - fromPartial(_: DeepPartial): MsgVerifyInvariantResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** VerifyInvariant defines a method to verify a particular invariance. */ - VerifyInvariant(request: MsgVerifyInvariant): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - VerifyInvariant(request: MsgVerifyInvariant): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js deleted file mode 100644 index 2ca4b9c..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js +++ /dev/null @@ -1,148 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.crisis.v1beta1"; -const baseMsgVerifyInvariant = { - sender: "", - invariantModuleName: "", - invariantRoute: "", -}; -export const MsgVerifyInvariant = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.invariantModuleName !== "") { - writer.uint32(18).string(message.invariantModuleName); - } - if (message.invariantRoute !== "") { - writer.uint32(26).string(message.invariantRoute); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVerifyInvariant }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.invariantModuleName = reader.string(); - break; - case 3: - message.invariantRoute = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgVerifyInvariant }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.invariantModuleName !== undefined && - object.invariantModuleName !== null) { - message.invariantModuleName = String(object.invariantModuleName); - } - else { - message.invariantModuleName = ""; - } - if (object.invariantRoute !== undefined && object.invariantRoute !== null) { - message.invariantRoute = String(object.invariantRoute); - } - else { - message.invariantRoute = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.invariantModuleName !== undefined && - (obj.invariantModuleName = message.invariantModuleName); - message.invariantRoute !== undefined && - (obj.invariantRoute = message.invariantRoute); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgVerifyInvariant }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.invariantModuleName !== undefined && - object.invariantModuleName !== null) { - message.invariantModuleName = object.invariantModuleName; - } - else { - message.invariantModuleName = ""; - } - if (object.invariantRoute !== undefined && object.invariantRoute !== null) { - message.invariantRoute = object.invariantRoute; - } - else { - message.invariantRoute = ""; - } - return message; - }, -}; -const baseMsgVerifyInvariantResponse = {}; -export const MsgVerifyInvariantResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgVerifyInvariantResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgVerifyInvariantResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgVerifyInvariantResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - VerifyInvariant(request) { - const data = MsgVerifyInvariant.encode(request).finish(); - const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "VerifyInvariant", data); - return promise.then((data) => MsgVerifyInvariantResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts deleted file mode 100644 index 6c66881..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts +++ /dev/null @@ -1,217 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.crisis.v1beta1"; - -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariant { - sender: string; - invariantModuleName: string; - invariantRoute: string; -} - -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponse {} - -const baseMsgVerifyInvariant: object = { - sender: "", - invariantModuleName: "", - invariantRoute: "", -}; - -export const MsgVerifyInvariant = { - encode( - message: MsgVerifyInvariant, - writer: Writer = Writer.create() - ): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.invariantModuleName !== "") { - writer.uint32(18).string(message.invariantModuleName); - } - if (message.invariantRoute !== "") { - writer.uint32(26).string(message.invariantRoute); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVerifyInvariant { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVerifyInvariant } as MsgVerifyInvariant; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.invariantModuleName = reader.string(); - break; - case 3: - message.invariantRoute = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgVerifyInvariant { - const message = { ...baseMsgVerifyInvariant } as MsgVerifyInvariant; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if ( - object.invariantModuleName !== undefined && - object.invariantModuleName !== null - ) { - message.invariantModuleName = String(object.invariantModuleName); - } else { - message.invariantModuleName = ""; - } - if (object.invariantRoute !== undefined && object.invariantRoute !== null) { - message.invariantRoute = String(object.invariantRoute); - } else { - message.invariantRoute = ""; - } - return message; - }, - - toJSON(message: MsgVerifyInvariant): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.invariantModuleName !== undefined && - (obj.invariantModuleName = message.invariantModuleName); - message.invariantRoute !== undefined && - (obj.invariantRoute = message.invariantRoute); - return obj; - }, - - fromPartial(object: DeepPartial): MsgVerifyInvariant { - const message = { ...baseMsgVerifyInvariant } as MsgVerifyInvariant; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if ( - object.invariantModuleName !== undefined && - object.invariantModuleName !== null - ) { - message.invariantModuleName = object.invariantModuleName; - } else { - message.invariantModuleName = ""; - } - if (object.invariantRoute !== undefined && object.invariantRoute !== null) { - message.invariantRoute = object.invariantRoute; - } else { - message.invariantRoute = ""; - } - return message; - }, -}; - -const baseMsgVerifyInvariantResponse: object = {}; - -export const MsgVerifyInvariantResponse = { - encode( - _: MsgVerifyInvariantResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgVerifyInvariantResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgVerifyInvariantResponse, - } as MsgVerifyInvariantResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgVerifyInvariantResponse { - const message = { - ...baseMsgVerifyInvariantResponse, - } as MsgVerifyInvariantResponse; - return message; - }, - - toJSON(_: MsgVerifyInvariantResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgVerifyInvariantResponse { - const message = { - ...baseMsgVerifyInvariantResponse, - } as MsgVerifyInvariantResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** VerifyInvariant defines a method to verify a particular invariance. */ - VerifyInvariant( - request: MsgVerifyInvariant - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - VerifyInvariant( - request: MsgVerifyInvariant - ): Promise { - const data = MsgVerifyInvariant.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.crisis.v1beta1.Msg", - "VerifyInvariant", - data - ); - return promise.then((data) => - MsgVerifyInvariantResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js deleted file mode 100644 index e21acf5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js +++ /dev/null @@ -1,425 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { Params } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorHistoricalRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorCurrentRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorAccumulatedCommission } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorOutstandingRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorSlashEvent } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorSlashEvents } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { FeePool } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { CommunityPoolSpendProposal } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegatorStartingInfo } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegationDelegatorReward } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { CommunityPoolSpendProposalWithDeposit } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegatorWithdrawInfo } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorOutstandingRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorAccumulatedCommissionRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorHistoricalRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorCurrentRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { DelegatorStartingInfoRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorSlashEventRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Params: {}, - ValidatorOutstandingRewards: {}, - ValidatorCommission: {}, - ValidatorSlashes: {}, - DelegationRewards: {}, - DelegationTotalRewards: {}, - DelegatorValidators: {}, - DelegatorWithdrawAddress: {}, - CommunityPool: {}, - _Structure: { - Params: getStructure(Params.fromPartial({})), - ValidatorHistoricalRewards: getStructure(ValidatorHistoricalRewards.fromPartial({})), - ValidatorCurrentRewards: getStructure(ValidatorCurrentRewards.fromPartial({})), - ValidatorAccumulatedCommission: getStructure(ValidatorAccumulatedCommission.fromPartial({})), - ValidatorOutstandingRewards: getStructure(ValidatorOutstandingRewards.fromPartial({})), - ValidatorSlashEvent: getStructure(ValidatorSlashEvent.fromPartial({})), - ValidatorSlashEvents: getStructure(ValidatorSlashEvents.fromPartial({})), - FeePool: getStructure(FeePool.fromPartial({})), - CommunityPoolSpendProposal: getStructure(CommunityPoolSpendProposal.fromPartial({})), - DelegatorStartingInfo: getStructure(DelegatorStartingInfo.fromPartial({})), - DelegationDelegatorReward: getStructure(DelegationDelegatorReward.fromPartial({})), - CommunityPoolSpendProposalWithDeposit: getStructure(CommunityPoolSpendProposalWithDeposit.fromPartial({})), - DelegatorWithdrawInfo: getStructure(DelegatorWithdrawInfo.fromPartial({})), - ValidatorOutstandingRewardsRecord: getStructure(ValidatorOutstandingRewardsRecord.fromPartial({})), - ValidatorAccumulatedCommissionRecord: getStructure(ValidatorAccumulatedCommissionRecord.fromPartial({})), - ValidatorHistoricalRewardsRecord: getStructure(ValidatorHistoricalRewardsRecord.fromPartial({})), - ValidatorCurrentRewardsRecord: getStructure(ValidatorCurrentRewardsRecord.fromPartial({})), - DelegatorStartingInfoRecord: getStructure(DelegatorStartingInfoRecord.fromPartial({})), - ValidatorSlashEventRecord: getStructure(ValidatorSlashEventRecord.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getValidatorOutstandingRewards: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorOutstandingRewards[JSON.stringify(params)] ?? {}; - }, - getValidatorCommission: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorCommission[JSON.stringify(params)] ?? {}; - }, - getValidatorSlashes: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorSlashes[JSON.stringify(params)] ?? {}; - }, - getDelegationRewards: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegationRewards[JSON.stringify(params)] ?? {}; - }, - getDelegationTotalRewards: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegationTotalRewards[JSON.stringify(params)] ?? {}; - }, - getDelegatorValidators: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {}; - }, - getDelegatorWithdrawAddress: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorWithdrawAddress[JSON.stringify(params)] ?? {}; - }, - getCommunityPool: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.CommunityPool[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryParams(query)).data : (await (await initQueryClient(rootGetters)).queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryValidatorOutstandingRewards({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidatorOutstandingRewards(key.validator_address, query)).data : (await (await initQueryClient(rootGetters)).queryValidatorOutstandingRewards(key.validator_address)).data; - commit('QUERY', { query: 'ValidatorOutstandingRewards', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorOutstandingRewards', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorOutstandingRewards']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorOutstandingRewards', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryValidatorCommission({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidatorCommission(key.validator_address, query)).data : (await (await initQueryClient(rootGetters)).queryValidatorCommission(key.validator_address)).data; - commit('QUERY', { query: 'ValidatorCommission', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorCommission', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorCommission']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorCommission', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryValidatorSlashes({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidatorSlashes(key.validator_address, query)).data : (await (await initQueryClient(rootGetters)).queryValidatorSlashes(key.validator_address)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryValidatorSlashes(key.validator_address, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ValidatorSlashes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorSlashes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorSlashes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorSlashes', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegationRewards({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegationRewards(key.delegator_address, key.validator_address, query)).data : (await (await initQueryClient(rootGetters)).queryDelegationRewards(key.delegator_address, key.validator_address)).data; - commit('QUERY', { query: 'DelegationRewards', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegationRewards', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegationRewards']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegationRewards', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegationTotalRewards({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegationTotalRewards(key.delegator_address, query)).data : (await (await initQueryClient(rootGetters)).queryDelegationTotalRewards(key.delegator_address)).data; - commit('QUERY', { query: 'DelegationTotalRewards', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegationTotalRewards', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegationTotalRewards']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegationTotalRewards', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegatorValidators(key.delegator_address, query)).data : (await (await initQueryClient(rootGetters)).queryDelegatorValidators(key.delegator_address)).data; - commit('QUERY', { query: 'DelegatorValidators', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorValidators']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorValidators', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegatorWithdrawAddress({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegatorWithdrawAddress(key.delegator_address, query)).data : (await (await initQueryClient(rootGetters)).queryDelegatorWithdrawAddress(key.delegator_address)).data; - commit('QUERY', { query: 'DelegatorWithdrawAddress', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorWithdrawAddress', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorWithdrawAddress']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorWithdrawAddress', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryCommunityPool({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryCommunityPool(query)).data : (await (await initQueryClient(rootGetters)).queryCommunityPool()).data; - commit('QUERY', { query: 'CommunityPool', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryCommunityPool', payload: { options: { all }, params: { ...key }, query } }); - return getters['getCommunityPool']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryCommunityPool', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgFundCommunityPool({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgFundCommunityPool(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgWithdrawValidatorCommission({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawValidatorCommission(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgWithdrawDelegatorReward({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawDelegatorReward(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgSetWithdrawAddress({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSetWithdrawAddress(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgFundCommunityPool({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgFundCommunityPool(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Create', 'Could not create message.'); - } - } - }, - async MsgWithdrawValidatorCommission({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawValidatorCommission(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Create', 'Could not create message.'); - } - } - }, - async MsgWithdrawDelegatorReward({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawDelegatorReward(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Create', 'Could not create message.'); - } - } - }, - async MsgSetWithdrawAddress({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSetWithdrawAddress(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts deleted file mode 100644 index 12a4634..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts +++ /dev/null @@ -1,423 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { Params } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorHistoricalRewards } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorCurrentRewards } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorAccumulatedCommission } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorOutstandingRewards } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorSlashEvent } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorSlashEvents } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { FeePool } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { CommunityPoolSpendProposal } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { DelegatorStartingInfo } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { DelegationDelegatorReward } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { CommunityPoolSpendProposalWithDeposit } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { DelegatorWithdrawInfo } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorOutstandingRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorAccumulatedCommissionRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorHistoricalRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorCurrentRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { DelegatorStartingInfoRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorSlashEventRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - ValidatorOutstandingRewards: {}, - ValidatorCommission: {}, - ValidatorSlashes: {}, - DelegationRewards: {}, - DelegationTotalRewards: {}, - DelegatorValidators: {}, - DelegatorWithdrawAddress: {}, - CommunityPool: {}, - - _Structure: { - Params: getStructure(Params.fromPartial({})), - ValidatorHistoricalRewards: getStructure(ValidatorHistoricalRewards.fromPartial({})), - ValidatorCurrentRewards: getStructure(ValidatorCurrentRewards.fromPartial({})), - ValidatorAccumulatedCommission: getStructure(ValidatorAccumulatedCommission.fromPartial({})), - ValidatorOutstandingRewards: getStructure(ValidatorOutstandingRewards.fromPartial({})), - ValidatorSlashEvent: getStructure(ValidatorSlashEvent.fromPartial({})), - ValidatorSlashEvents: getStructure(ValidatorSlashEvents.fromPartial({})), - FeePool: getStructure(FeePool.fromPartial({})), - CommunityPoolSpendProposal: getStructure(CommunityPoolSpendProposal.fromPartial({})), - DelegatorStartingInfo: getStructure(DelegatorStartingInfo.fromPartial({})), - DelegationDelegatorReward: getStructure(DelegationDelegatorReward.fromPartial({})), - CommunityPoolSpendProposalWithDeposit: getStructure(CommunityPoolSpendProposalWithDeposit.fromPartial({})), - DelegatorWithdrawInfo: getStructure(DelegatorWithdrawInfo.fromPartial({})), - ValidatorOutstandingRewardsRecord: getStructure(ValidatorOutstandingRewardsRecord.fromPartial({})), - ValidatorAccumulatedCommissionRecord: getStructure(ValidatorAccumulatedCommissionRecord.fromPartial({})), - ValidatorHistoricalRewardsRecord: getStructure(ValidatorHistoricalRewardsRecord.fromPartial({})), - ValidatorCurrentRewardsRecord: getStructure(ValidatorCurrentRewardsRecord.fromPartial({})), - DelegatorStartingInfoRecord: getStructure(DelegatorStartingInfoRecord.fromPartial({})), - ValidatorSlashEventRecord: getStructure(ValidatorSlashEventRecord.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getValidatorOutstandingRewards: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorOutstandingRewards[JSON.stringify(params)] ?? {} - }, - getValidatorCommission: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorCommission[JSON.stringify(params)] ?? {} - }, - getValidatorSlashes: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorSlashes[JSON.stringify(params)] ?? {} - }, - getDelegationRewards: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegationRewards[JSON.stringify(params)] ?? {} - }, - getDelegationTotalRewards: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegationTotalRewards[JSON.stringify(params)] ?? {} - }, - getDelegatorValidators: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {} - }, - getDelegatorWithdrawAddress: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorWithdrawAddress[JSON.stringify(params)] ?? {} - }, - getCommunityPool: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.CommunityPool[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryParams( query)).data:(await (await initQueryClient(rootGetters)).queryParams()).data - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryValidatorOutstandingRewards({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidatorOutstandingRewards( key.validator_address, query)).data:(await (await initQueryClient(rootGetters)).queryValidatorOutstandingRewards( key.validator_address )).data - - commit('QUERY', { query: 'ValidatorOutstandingRewards', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorOutstandingRewards', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorOutstandingRewards']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorOutstandingRewards', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryValidatorCommission({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidatorCommission( key.validator_address, query)).data:(await (await initQueryClient(rootGetters)).queryValidatorCommission( key.validator_address )).data - - commit('QUERY', { query: 'ValidatorCommission', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorCommission', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorCommission']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorCommission', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryValidatorSlashes({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidatorSlashes( key.validator_address, query)).data:(await (await initQueryClient(rootGetters)).queryValidatorSlashes( key.validator_address )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryValidatorSlashes( key.validator_address, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ValidatorSlashes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorSlashes', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorSlashes']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorSlashes', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegationRewards({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegationRewards( key.delegator_address, key.validator_address, query)).data:(await (await initQueryClient(rootGetters)).queryDelegationRewards( key.delegator_address , key.validator_address )).data - - commit('QUERY', { query: 'DelegationRewards', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegationRewards', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegationRewards']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegationRewards', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegationTotalRewards({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegationTotalRewards( key.delegator_address, query)).data:(await (await initQueryClient(rootGetters)).queryDelegationTotalRewards( key.delegator_address )).data - - commit('QUERY', { query: 'DelegationTotalRewards', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegationTotalRewards', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegationTotalRewards']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegationTotalRewards', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegatorValidators( key.delegator_address, query)).data:(await (await initQueryClient(rootGetters)).queryDelegatorValidators( key.delegator_address )).data - - commit('QUERY', { query: 'DelegatorValidators', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorValidators']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorValidators', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegatorWithdrawAddress({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegatorWithdrawAddress( key.delegator_address, query)).data:(await (await initQueryClient(rootGetters)).queryDelegatorWithdrawAddress( key.delegator_address )).data - - commit('QUERY', { query: 'DelegatorWithdrawAddress', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorWithdrawAddress', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorWithdrawAddress']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorWithdrawAddress', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryCommunityPool({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryCommunityPool( query)).data:(await (await initQueryClient(rootGetters)).queryCommunityPool()).data - - commit('QUERY', { query: 'CommunityPool', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryCommunityPool', payload: { options: { all }, params: {...key},query }}) - return getters['getCommunityPool']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryCommunityPool', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgFundCommunityPool({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgFundCommunityPool(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgFundCommunityPool:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgWithdrawValidatorCommission({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawValidatorCommission(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgWithdrawDelegatorReward({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawDelegatorReward(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgSetWithdrawAddress({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSetWithdrawAddress(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgFundCommunityPool({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgFundCommunityPool(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgFundCommunityPool:Create', 'Could not create message.') - } - } - }, - async MsgWithdrawValidatorCommission({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawValidatorCommission(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Create', 'Could not create message.') - } - } - }, - async MsgWithdrawDelegatorReward({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgWithdrawDelegatorReward(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Create', 'Could not create message.') - } - } - }, - async MsgSetWithdrawAddress({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSetWithdrawAddress(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts deleted file mode 100644 index 8c44f85..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgFundCommunityPool: (data: MsgFundCommunityPool) => EncodeObject; - msgWithdrawValidatorCommission: (data: MsgWithdrawValidatorCommission) => EncodeObject; - msgWithdrawDelegatorReward: (data: MsgWithdrawDelegatorReward) => EncodeObject; - msgSetWithdrawAddress: (data: MsgSetWithdrawAddress) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js deleted file mode 100644 index e60b34e..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js +++ /dev/null @@ -1,36 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; -const types = [ - ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], - ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], - ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], - ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgFundCommunityPool: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: data }), - msgWithdrawValidatorCommission: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: data }), - msgWithdrawDelegatorReward: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: data }), - msgSetWithdrawAddress: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts deleted file mode 100644 index 3780c7a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; - - -const types = [ - ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], - ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], - ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], - ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgFundCommunityPool: (data: MsgFundCommunityPool): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: data }), - msgWithdrawValidatorCommission: (data: MsgWithdrawValidatorCommission): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: data }), - msgWithdrawDelegatorReward: (data: MsgWithdrawDelegatorReward): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: data }), - msgSetWithdrawAddress: (data: MsgSetWithdrawAddress): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts deleted file mode 100644 index 685b4e9..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,362 +0,0 @@ -export interface ProtobufAny { - typeUrl?: string; - /** @format byte */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* DecCoin defines a token with a denomination and a decimal amount. - -NOTE: The amount field is an Dec which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1DecCoin { - denom?: string; - amount?: string; -} -/** -* DelegationDelegatorReward represents the properties -of a delegator's delegation reward. -*/ -export interface V1Beta1DelegationDelegatorReward { - validatorAddress?: string; - reward?: V1Beta1DecCoin[]; -} -/** - * MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. - */ -export declare type V1Beta1MsgFundCommunityPoolResponse = object; -/** - * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. - */ -export declare type V1Beta1MsgSetWithdrawAddressResponse = object; -/** - * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. - */ -export declare type V1Beta1MsgWithdrawDelegatorRewardResponse = object; -/** - * MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. - */ -export declare type V1Beta1MsgWithdrawValidatorCommissionResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params defines the set of params for the distribution module. - */ -export interface V1Beta1Params { - communityTax?: string; - baseProposerReward?: string; - bonusProposerReward?: string; - withdrawAddrEnabled?: boolean; -} -/** -* QueryCommunityPoolResponse is the response type for the Query/CommunityPool -RPC method. -*/ -export interface V1Beta1QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool?: V1Beta1DecCoin[]; -} -/** -* QueryDelegationRewardsResponse is the response type for the -Query/DelegationRewards RPC method. -*/ -export interface V1Beta1QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards?: V1Beta1DecCoin[]; -} -/** -* QueryDelegationTotalRewardsResponse is the response type for the -Query/DelegationTotalRewards RPC method. -*/ -export interface V1Beta1QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards?: V1Beta1DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total?: V1Beta1DecCoin[]; -} -/** -* QueryDelegatorValidatorsResponse is the response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators?: string[]; -} -/** -* QueryDelegatorWithdrawAddressResponse is the response type for the -Query/DelegatorWithdrawAddress RPC method. -*/ -export interface V1Beta1QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress?: string; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Beta1Params; -} -export interface V1Beta1QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission?: V1Beta1ValidatorAccumulatedCommission; -} -/** -* QueryValidatorOutstandingRewardsResponse is the response type for the -Query/ValidatorOutstandingRewards RPC method. -*/ -export interface V1Beta1QueryValidatorOutstandingRewardsResponse { - /** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ - rewards?: V1Beta1ValidatorOutstandingRewards; -} -/** -* QueryValidatorSlashesResponse is the response type for the -Query/ValidatorSlashes RPC method. -*/ -export interface V1Beta1QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes?: V1Beta1ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* ValidatorAccumulatedCommission represents accumulated commission -for a validator kept as a running counter, can be withdrawn at any time. -*/ -export interface V1Beta1ValidatorAccumulatedCommission { - commission?: V1Beta1DecCoin[]; -} -/** -* ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -for a validator inexpensive to track, allows simple sanity checks. -*/ -export interface V1Beta1ValidatorOutstandingRewards { - rewards?: V1Beta1DecCoin[]; -} -/** -* ValidatorSlashEvent represents a validator slash event. -Height is implicit within the store key. -This is needed to calculate appropriate amount of staking tokens -for delegations which are withdrawn after a slash has occurred. -*/ -export interface V1Beta1ValidatorSlashEvent { - /** @format uint64 */ - validatorPeriod?: string; - fraction?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/distribution/v1beta1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryCommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - queryCommunityPool: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each - validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards - */ - queryDelegationTotalRewards: (delegatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress} - */ - queryDelegationRewards: (delegatorAddress: string, validatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators - */ - queryDelegatorValidators: (delegatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address - */ - queryDelegatorWithdrawAddress: (delegatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/commission - */ - queryValidatorCommission: (validatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards - */ - queryValidatorOutstandingRewards: (validatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes - */ - queryValidatorSlashes: (validatorAddress: string, query?: { - startingHeight?: string; - endingHeight?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js deleted file mode 100644 index 02c1b15..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js +++ /dev/null @@ -1,268 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/distribution/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryCommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - this.queryCommunityPool = (params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/community_pool`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each - validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards - */ - this.queryDelegationTotalRewards = (delegatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress} - */ - this.queryDelegationRewards = (delegatorAddress, validatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators - */ - this.queryDelegatorValidators = (delegatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address - */ - this.queryDelegatorWithdrawAddress = (delegatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/commission - */ - this.queryValidatorCommission = (validatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards - */ - this.queryValidatorOutstandingRewards = (validatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes - */ - this.queryValidatorSlashes = (validatorAddress, query, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts deleted file mode 100644 index 24ef404..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts +++ /dev/null @@ -1,608 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - typeUrl?: string; - - /** @format byte */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* DecCoin defines a token with a denomination and a decimal amount. - -NOTE: The amount field is an Dec which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1DecCoin { - denom?: string; - amount?: string; -} - -/** -* DelegationDelegatorReward represents the properties -of a delegator's delegation reward. -*/ -export interface V1Beta1DelegationDelegatorReward { - validatorAddress?: string; - reward?: V1Beta1DecCoin[]; -} - -/** - * MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. - */ -export type V1Beta1MsgFundCommunityPoolResponse = object; - -/** - * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. - */ -export type V1Beta1MsgSetWithdrawAddressResponse = object; - -/** - * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. - */ -export type V1Beta1MsgWithdrawDelegatorRewardResponse = object; - -/** - * MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. - */ -export type V1Beta1MsgWithdrawValidatorCommissionResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the set of params for the distribution module. - */ -export interface V1Beta1Params { - communityTax?: string; - baseProposerReward?: string; - bonusProposerReward?: string; - withdrawAddrEnabled?: boolean; -} - -/** -* QueryCommunityPoolResponse is the response type for the Query/CommunityPool -RPC method. -*/ -export interface V1Beta1QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool?: V1Beta1DecCoin[]; -} - -/** -* QueryDelegationRewardsResponse is the response type for the -Query/DelegationRewards RPC method. -*/ -export interface V1Beta1QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards?: V1Beta1DecCoin[]; -} - -/** -* QueryDelegationTotalRewardsResponse is the response type for the -Query/DelegationTotalRewards RPC method. -*/ -export interface V1Beta1QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards?: V1Beta1DelegationDelegatorReward[]; - - /** total defines the sum of all the rewards. */ - total?: V1Beta1DecCoin[]; -} - -/** -* QueryDelegatorValidatorsResponse is the response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators?: string[]; -} - -/** -* QueryDelegatorWithdrawAddressResponse is the response type for the -Query/DelegatorWithdrawAddress RPC method. -*/ -export interface V1Beta1QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress?: string; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Beta1Params; -} - -export interface V1Beta1QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission?: V1Beta1ValidatorAccumulatedCommission; -} - -/** -* QueryValidatorOutstandingRewardsResponse is the response type for the -Query/ValidatorOutstandingRewards RPC method. -*/ -export interface V1Beta1QueryValidatorOutstandingRewardsResponse { - /** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ - rewards?: V1Beta1ValidatorOutstandingRewards; -} - -/** -* QueryValidatorSlashesResponse is the response type for the -Query/ValidatorSlashes RPC method. -*/ -export interface V1Beta1QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes?: V1Beta1ValidatorSlashEvent[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* ValidatorAccumulatedCommission represents accumulated commission -for a validator kept as a running counter, can be withdrawn at any time. -*/ -export interface V1Beta1ValidatorAccumulatedCommission { - commission?: V1Beta1DecCoin[]; -} - -/** -* ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -for a validator inexpensive to track, allows simple sanity checks. -*/ -export interface V1Beta1ValidatorOutstandingRewards { - rewards?: V1Beta1DecCoin[]; -} - -/** -* ValidatorSlashEvent represents a validator slash event. -Height is implicit within the store key. -This is needed to calculate appropriate amount of staking tokens -for delegations which are withdrawn after a slash has occurred. -*/ -export interface V1Beta1ValidatorSlashEvent { - /** @format uint64 */ - validatorPeriod?: string; - fraction?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/distribution/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryCommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - queryCommunityPool = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/community_pool`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each -validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards - */ - queryDelegationTotalRewards = (delegatorAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress} - */ - queryDelegationRewards = (delegatorAddress: string, validatorAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators - */ - queryDelegatorValidators = (delegatorAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address - */ - queryDelegatorWithdrawAddress = (delegatorAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/commission - */ - queryValidatorCommission = (validatorAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards - */ - queryValidatorOutstandingRewards = (validatorAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes - */ - queryValidatorSlashes = ( - validatorAddress: string, - query?: { - startingHeight?: string; - endingHeight?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts deleted file mode 100644 index 3286a30..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { DecCoin, Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** Params defines the set of params for the distribution module. */ -export interface Params { - communityTax: string; - baseProposerReward: string; - bonusProposerReward: string; - withdrawAddrEnabled: boolean; -} -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewards { - cumulativeRewardRatio: DecCoin[]; - referenceCount: number; -} -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewards { - rewards: DecCoin[]; - period: number; -} -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommission { - commission: DecCoin[]; -} -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewards { - rewards: DecCoin[]; -} -/** - * ValidatorSlashEvent represents a validator slash event. - * Height is implicit within the store key. - * This is needed to calculate appropriate amount of staking tokens - * for delegations which are withdrawn after a slash has occurred. - */ -export interface ValidatorSlashEvent { - validatorPeriod: number; - fraction: string; -} -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEvents { - validatorSlashEvents: ValidatorSlashEvent[]; -} -/** FeePool is the global fee pool for distribution. */ -export interface FeePool { - communityPool: DecCoin[]; -} -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposal { - title: string; - description: string; - recipient: string; - amount: Coin[]; -} -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfo { - previousPeriod: number; - stake: string; - height: number; -} -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorReward { - validatorAddress: string; - reward: DecCoin[]; -} -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDeposit { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const ValidatorHistoricalRewards: { - encode(message: ValidatorHistoricalRewards, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorHistoricalRewards; - fromJSON(object: any): ValidatorHistoricalRewards; - toJSON(message: ValidatorHistoricalRewards): unknown; - fromPartial(object: DeepPartial): ValidatorHistoricalRewards; -}; -export declare const ValidatorCurrentRewards: { - encode(message: ValidatorCurrentRewards, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorCurrentRewards; - fromJSON(object: any): ValidatorCurrentRewards; - toJSON(message: ValidatorCurrentRewards): unknown; - fromPartial(object: DeepPartial): ValidatorCurrentRewards; -}; -export declare const ValidatorAccumulatedCommission: { - encode(message: ValidatorAccumulatedCommission, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorAccumulatedCommission; - fromJSON(object: any): ValidatorAccumulatedCommission; - toJSON(message: ValidatorAccumulatedCommission): unknown; - fromPartial(object: DeepPartial): ValidatorAccumulatedCommission; -}; -export declare const ValidatorOutstandingRewards: { - encode(message: ValidatorOutstandingRewards, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorOutstandingRewards; - fromJSON(object: any): ValidatorOutstandingRewards; - toJSON(message: ValidatorOutstandingRewards): unknown; - fromPartial(object: DeepPartial): ValidatorOutstandingRewards; -}; -export declare const ValidatorSlashEvent: { - encode(message: ValidatorSlashEvent, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvent; - fromJSON(object: any): ValidatorSlashEvent; - toJSON(message: ValidatorSlashEvent): unknown; - fromPartial(object: DeepPartial): ValidatorSlashEvent; -}; -export declare const ValidatorSlashEvents: { - encode(message: ValidatorSlashEvents, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvents; - fromJSON(object: any): ValidatorSlashEvents; - toJSON(message: ValidatorSlashEvents): unknown; - fromPartial(object: DeepPartial): ValidatorSlashEvents; -}; -export declare const FeePool: { - encode(message: FeePool, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FeePool; - fromJSON(object: any): FeePool; - toJSON(message: FeePool): unknown; - fromPartial(object: DeepPartial): FeePool; -}; -export declare const CommunityPoolSpendProposal: { - encode(message: CommunityPoolSpendProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommunityPoolSpendProposal; - fromJSON(object: any): CommunityPoolSpendProposal; - toJSON(message: CommunityPoolSpendProposal): unknown; - fromPartial(object: DeepPartial): CommunityPoolSpendProposal; -}; -export declare const DelegatorStartingInfo: { - encode(message: DelegatorStartingInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegatorStartingInfo; - fromJSON(object: any): DelegatorStartingInfo; - toJSON(message: DelegatorStartingInfo): unknown; - fromPartial(object: DeepPartial): DelegatorStartingInfo; -}; -export declare const DelegationDelegatorReward: { - encode(message: DelegationDelegatorReward, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegationDelegatorReward; - fromJSON(object: any): DelegationDelegatorReward; - toJSON(message: DelegationDelegatorReward): unknown; - fromPartial(object: DeepPartial): DelegationDelegatorReward; -}; -export declare const CommunityPoolSpendProposalWithDeposit: { - encode(message: CommunityPoolSpendProposalWithDeposit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommunityPoolSpendProposalWithDeposit; - fromJSON(object: any): CommunityPoolSpendProposalWithDeposit; - toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown; - fromPartial(object: DeepPartial): CommunityPoolSpendProposalWithDeposit; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js deleted file mode 100644 index c3ee057..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js +++ /dev/null @@ -1,1075 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin, Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseParams = { - communityTax: "", - baseProposerReward: "", - bonusProposerReward: "", - withdrawAddrEnabled: false, -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.communityTax !== "") { - writer.uint32(10).string(message.communityTax); - } - if (message.baseProposerReward !== "") { - writer.uint32(18).string(message.baseProposerReward); - } - if (message.bonusProposerReward !== "") { - writer.uint32(26).string(message.bonusProposerReward); - } - if (message.withdrawAddrEnabled === true) { - writer.uint32(32).bool(message.withdrawAddrEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityTax = reader.string(); - break; - case 2: - message.baseProposerReward = reader.string(); - break; - case 3: - message.bonusProposerReward = reader.string(); - break; - case 4: - message.withdrawAddrEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.communityTax !== undefined && object.communityTax !== null) { - message.communityTax = String(object.communityTax); - } - else { - message.communityTax = ""; - } - if (object.baseProposerReward !== undefined && - object.baseProposerReward !== null) { - message.baseProposerReward = String(object.baseProposerReward); - } - else { - message.baseProposerReward = ""; - } - if (object.bonusProposerReward !== undefined && - object.bonusProposerReward !== null) { - message.bonusProposerReward = String(object.bonusProposerReward); - } - else { - message.bonusProposerReward = ""; - } - if (object.withdrawAddrEnabled !== undefined && - object.withdrawAddrEnabled !== null) { - message.withdrawAddrEnabled = Boolean(object.withdrawAddrEnabled); - } - else { - message.withdrawAddrEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.communityTax !== undefined && - (obj.communityTax = message.communityTax); - message.baseProposerReward !== undefined && - (obj.baseProposerReward = message.baseProposerReward); - message.bonusProposerReward !== undefined && - (obj.bonusProposerReward = message.bonusProposerReward); - message.withdrawAddrEnabled !== undefined && - (obj.withdrawAddrEnabled = message.withdrawAddrEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.communityTax !== undefined && object.communityTax !== null) { - message.communityTax = object.communityTax; - } - else { - message.communityTax = ""; - } - if (object.baseProposerReward !== undefined && - object.baseProposerReward !== null) { - message.baseProposerReward = object.baseProposerReward; - } - else { - message.baseProposerReward = ""; - } - if (object.bonusProposerReward !== undefined && - object.bonusProposerReward !== null) { - message.bonusProposerReward = object.bonusProposerReward; - } - else { - message.bonusProposerReward = ""; - } - if (object.withdrawAddrEnabled !== undefined && - object.withdrawAddrEnabled !== null) { - message.withdrawAddrEnabled = object.withdrawAddrEnabled; - } - else { - message.withdrawAddrEnabled = false; - } - return message; - }, -}; -const baseValidatorHistoricalRewards = { referenceCount: 0 }; -export const ValidatorHistoricalRewards = { - encode(message, writer = Writer.create()) { - for (const v of message.cumulativeRewardRatio) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.referenceCount !== 0) { - writer.uint32(16).uint32(message.referenceCount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewards, - }; - message.cumulativeRewardRatio = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cumulativeRewardRatio.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.referenceCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorHistoricalRewards, - }; - message.cumulativeRewardRatio = []; - if (object.cumulativeRewardRatio !== undefined && - object.cumulativeRewardRatio !== null) { - for (const e of object.cumulativeRewardRatio) { - message.cumulativeRewardRatio.push(DecCoin.fromJSON(e)); - } - } - if (object.referenceCount !== undefined && object.referenceCount !== null) { - message.referenceCount = Number(object.referenceCount); - } - else { - message.referenceCount = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.cumulativeRewardRatio) { - obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.cumulativeRewardRatio = []; - } - message.referenceCount !== undefined && - (obj.referenceCount = message.referenceCount); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorHistoricalRewards, - }; - message.cumulativeRewardRatio = []; - if (object.cumulativeRewardRatio !== undefined && - object.cumulativeRewardRatio !== null) { - for (const e of object.cumulativeRewardRatio) { - message.cumulativeRewardRatio.push(DecCoin.fromPartial(e)); - } - } - if (object.referenceCount !== undefined && object.referenceCount !== null) { - message.referenceCount = object.referenceCount; - } - else { - message.referenceCount = 0; - } - return message; - }, -}; -const baseValidatorCurrentRewards = { period: 0 }; -export const ValidatorCurrentRewards = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewards, - }; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.period = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorCurrentRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } - else { - message.period = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - message.period !== undefined && (obj.period = message.period); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorCurrentRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } - else { - message.period = 0; - } - return message; - }, -}; -const baseValidatorAccumulatedCommission = {}; -export const ValidatorAccumulatedCommission = { - encode(message, writer = Writer.create()) { - for (const v of message.commission) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommission, - }; - message.commission = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorAccumulatedCommission, - }; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.commission) { - obj.commission = message.commission.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.commission = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorAccumulatedCommission, - }; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseValidatorOutstandingRewards = {}; -export const ValidatorOutstandingRewards = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewards, - }; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorOutstandingRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorOutstandingRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseValidatorSlashEvent = { validatorPeriod: 0, fraction: "" }; -export const ValidatorSlashEvent = { - encode(message, writer = Writer.create()) { - if (message.validatorPeriod !== 0) { - writer.uint32(8).uint64(message.validatorPeriod); - } - if (message.fraction !== "") { - writer.uint32(18).string(message.fraction); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvent }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorPeriod = longToNumber(reader.uint64()); - break; - case 2: - message.fraction = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSlashEvent }; - if (object.validatorPeriod !== undefined && - object.validatorPeriod !== null) { - message.validatorPeriod = Number(object.validatorPeriod); - } - else { - message.validatorPeriod = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = String(object.fraction); - } - else { - message.fraction = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorPeriod !== undefined && - (obj.validatorPeriod = message.validatorPeriod); - message.fraction !== undefined && (obj.fraction = message.fraction); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSlashEvent }; - if (object.validatorPeriod !== undefined && - object.validatorPeriod !== null) { - message.validatorPeriod = object.validatorPeriod; - } - else { - message.validatorPeriod = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = object.fraction; - } - else { - message.fraction = ""; - } - return message; - }, -}; -const baseValidatorSlashEvents = {}; -export const ValidatorSlashEvents = { - encode(message, writer = Writer.create()) { - for (const v of message.validatorSlashEvents) { - ValidatorSlashEvent.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvents }; - message.validatorSlashEvents = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorSlashEvents.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSlashEvents }; - message.validatorSlashEvents = []; - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEvent.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEvent.toJSON(e) : undefined); - } - else { - obj.validatorSlashEvents = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSlashEvents }; - message.validatorSlashEvents = []; - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEvent.fromPartial(e)); - } - } - return message; - }, -}; -const baseFeePool = {}; -export const FeePool = { - encode(message, writer = Writer.create()) { - for (const v of message.communityPool) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFeePool }; - message.communityPool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityPool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFeePool }; - message.communityPool = []; - if (object.communityPool !== undefined && object.communityPool !== null) { - for (const e of object.communityPool) { - message.communityPool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.communityPool) { - obj.communityPool = message.communityPool.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.communityPool = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFeePool }; - message.communityPool = []; - if (object.communityPool !== undefined && object.communityPool !== null) { - for (const e of object.communityPool) { - message.communityPool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommunityPoolSpendProposal = { - title: "", - description: "", - recipient: "", -}; -export const CommunityPoolSpendProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposal, - }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCommunityPoolSpendProposal, - }; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseCommunityPoolSpendProposal, - }; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseDelegatorStartingInfo = { - previousPeriod: 0, - stake: "", - height: 0, -}; -export const DelegatorStartingInfo = { - encode(message, writer = Writer.create()) { - if (message.previousPeriod !== 0) { - writer.uint32(8).uint64(message.previousPeriod); - } - if (message.stake !== "") { - writer.uint32(18).string(message.stake); - } - if (message.height !== 0) { - writer.uint32(24).uint64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorStartingInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.previousPeriod = longToNumber(reader.uint64()); - break; - case 2: - message.stake = reader.string(); - break; - case 3: - message.height = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegatorStartingInfo }; - if (object.previousPeriod !== undefined && object.previousPeriod !== null) { - message.previousPeriod = Number(object.previousPeriod); - } - else { - message.previousPeriod = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = String(object.stake); - } - else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.previousPeriod !== undefined && - (obj.previousPeriod = message.previousPeriod); - message.stake !== undefined && (obj.stake = message.stake); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegatorStartingInfo }; - if (object.previousPeriod !== undefined && object.previousPeriod !== null) { - message.previousPeriod = object.previousPeriod; - } - else { - message.previousPeriod = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = object.stake; - } - else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseDelegationDelegatorReward = { validatorAddress: "" }; -export const DelegationDelegatorReward = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.reward) { - DecCoin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegationDelegatorReward, - }; - message.reward = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.reward.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDelegationDelegatorReward, - }; - message.reward = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.reward) { - obj.reward = message.reward.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.reward = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseDelegationDelegatorReward, - }; - message.reward = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommunityPoolSpendProposalWithDeposit = { - title: "", - description: "", - recipient: "", - amount: "", - deposit: "", -}; -export const CommunityPoolSpendProposalWithDeposit = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - if (message.amount !== "") { - writer.uint32(34).string(message.amount); - } - if (message.deposit !== "") { - writer.uint32(42).string(message.deposit); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount = reader.string(); - break; - case 5: - message.deposit = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = String(object.deposit); - } - else { - message.deposit = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - message.amount !== undefined && (obj.amount = message.amount); - message.deposit !== undefined && (obj.deposit = message.deposit); - return obj; - }, - fromPartial(object) { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = object.deposit; - } - else { - message.deposit = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts deleted file mode 100644 index c8a6ff8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts +++ /dev/null @@ -1,1343 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin, Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** Params defines the set of params for the distribution module. */ -export interface Params { - communityTax: string; - baseProposerReward: string; - bonusProposerReward: string; - withdrawAddrEnabled: boolean; -} - -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewards { - cumulativeRewardRatio: DecCoin[]; - referenceCount: number; -} - -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewards { - rewards: DecCoin[]; - period: number; -} - -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommission { - commission: DecCoin[]; -} - -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewards { - rewards: DecCoin[]; -} - -/** - * ValidatorSlashEvent represents a validator slash event. - * Height is implicit within the store key. - * This is needed to calculate appropriate amount of staking tokens - * for delegations which are withdrawn after a slash has occurred. - */ -export interface ValidatorSlashEvent { - validatorPeriod: number; - fraction: string; -} - -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEvents { - validatorSlashEvents: ValidatorSlashEvent[]; -} - -/** FeePool is the global fee pool for distribution. */ -export interface FeePool { - communityPool: DecCoin[]; -} - -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposal { - title: string; - description: string; - recipient: string; - amount: Coin[]; -} - -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfo { - previousPeriod: number; - stake: string; - height: number; -} - -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorReward { - validatorAddress: string; - reward: DecCoin[]; -} - -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDeposit { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} - -const baseParams: object = { - communityTax: "", - baseProposerReward: "", - bonusProposerReward: "", - withdrawAddrEnabled: false, -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.communityTax !== "") { - writer.uint32(10).string(message.communityTax); - } - if (message.baseProposerReward !== "") { - writer.uint32(18).string(message.baseProposerReward); - } - if (message.bonusProposerReward !== "") { - writer.uint32(26).string(message.bonusProposerReward); - } - if (message.withdrawAddrEnabled === true) { - writer.uint32(32).bool(message.withdrawAddrEnabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityTax = reader.string(); - break; - case 2: - message.baseProposerReward = reader.string(); - break; - case 3: - message.bonusProposerReward = reader.string(); - break; - case 4: - message.withdrawAddrEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.communityTax !== undefined && object.communityTax !== null) { - message.communityTax = String(object.communityTax); - } else { - message.communityTax = ""; - } - if ( - object.baseProposerReward !== undefined && - object.baseProposerReward !== null - ) { - message.baseProposerReward = String(object.baseProposerReward); - } else { - message.baseProposerReward = ""; - } - if ( - object.bonusProposerReward !== undefined && - object.bonusProposerReward !== null - ) { - message.bonusProposerReward = String(object.bonusProposerReward); - } else { - message.bonusProposerReward = ""; - } - if ( - object.withdrawAddrEnabled !== undefined && - object.withdrawAddrEnabled !== null - ) { - message.withdrawAddrEnabled = Boolean(object.withdrawAddrEnabled); - } else { - message.withdrawAddrEnabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.communityTax !== undefined && - (obj.communityTax = message.communityTax); - message.baseProposerReward !== undefined && - (obj.baseProposerReward = message.baseProposerReward); - message.bonusProposerReward !== undefined && - (obj.bonusProposerReward = message.bonusProposerReward); - message.withdrawAddrEnabled !== undefined && - (obj.withdrawAddrEnabled = message.withdrawAddrEnabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.communityTax !== undefined && object.communityTax !== null) { - message.communityTax = object.communityTax; - } else { - message.communityTax = ""; - } - if ( - object.baseProposerReward !== undefined && - object.baseProposerReward !== null - ) { - message.baseProposerReward = object.baseProposerReward; - } else { - message.baseProposerReward = ""; - } - if ( - object.bonusProposerReward !== undefined && - object.bonusProposerReward !== null - ) { - message.bonusProposerReward = object.bonusProposerReward; - } else { - message.bonusProposerReward = ""; - } - if ( - object.withdrawAddrEnabled !== undefined && - object.withdrawAddrEnabled !== null - ) { - message.withdrawAddrEnabled = object.withdrawAddrEnabled; - } else { - message.withdrawAddrEnabled = false; - } - return message; - }, -}; - -const baseValidatorHistoricalRewards: object = { referenceCount: 0 }; - -export const ValidatorHistoricalRewards = { - encode( - message: ValidatorHistoricalRewards, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.cumulativeRewardRatio) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.referenceCount !== 0) { - writer.uint32(16).uint32(message.referenceCount); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorHistoricalRewards { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewards, - } as ValidatorHistoricalRewards; - message.cumulativeRewardRatio = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cumulativeRewardRatio.push( - DecCoin.decode(reader, reader.uint32()) - ); - break; - case 2: - message.referenceCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorHistoricalRewards { - const message = { - ...baseValidatorHistoricalRewards, - } as ValidatorHistoricalRewards; - message.cumulativeRewardRatio = []; - if ( - object.cumulativeRewardRatio !== undefined && - object.cumulativeRewardRatio !== null - ) { - for (const e of object.cumulativeRewardRatio) { - message.cumulativeRewardRatio.push(DecCoin.fromJSON(e)); - } - } - if (object.referenceCount !== undefined && object.referenceCount !== null) { - message.referenceCount = Number(object.referenceCount); - } else { - message.referenceCount = 0; - } - return message; - }, - - toJSON(message: ValidatorHistoricalRewards): unknown { - const obj: any = {}; - if (message.cumulativeRewardRatio) { - obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.cumulativeRewardRatio = []; - } - message.referenceCount !== undefined && - (obj.referenceCount = message.referenceCount); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorHistoricalRewards { - const message = { - ...baseValidatorHistoricalRewards, - } as ValidatorHistoricalRewards; - message.cumulativeRewardRatio = []; - if ( - object.cumulativeRewardRatio !== undefined && - object.cumulativeRewardRatio !== null - ) { - for (const e of object.cumulativeRewardRatio) { - message.cumulativeRewardRatio.push(DecCoin.fromPartial(e)); - } - } - if (object.referenceCount !== undefined && object.referenceCount !== null) { - message.referenceCount = object.referenceCount; - } else { - message.referenceCount = 0; - } - return message; - }, -}; - -const baseValidatorCurrentRewards: object = { period: 0 }; - -export const ValidatorCurrentRewards = { - encode( - message: ValidatorCurrentRewards, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorCurrentRewards { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewards, - } as ValidatorCurrentRewards; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.period = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorCurrentRewards { - const message = { - ...baseValidatorCurrentRewards, - } as ValidatorCurrentRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } else { - message.period = 0; - } - return message; - }, - - toJSON(message: ValidatorCurrentRewards): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - message.period !== undefined && (obj.period = message.period); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorCurrentRewards { - const message = { - ...baseValidatorCurrentRewards, - } as ValidatorCurrentRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } else { - message.period = 0; - } - return message; - }, -}; - -const baseValidatorAccumulatedCommission: object = {}; - -export const ValidatorAccumulatedCommission = { - encode( - message: ValidatorAccumulatedCommission, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.commission) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorAccumulatedCommission { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommission, - } as ValidatorAccumulatedCommission; - message.commission = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorAccumulatedCommission { - const message = { - ...baseValidatorAccumulatedCommission, - } as ValidatorAccumulatedCommission; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorAccumulatedCommission): unknown { - const obj: any = {}; - if (message.commission) { - obj.commission = message.commission.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.commission = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorAccumulatedCommission { - const message = { - ...baseValidatorAccumulatedCommission, - } as ValidatorAccumulatedCommission; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseValidatorOutstandingRewards: object = {}; - -export const ValidatorOutstandingRewards = { - encode( - message: ValidatorOutstandingRewards, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorOutstandingRewards { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewards, - } as ValidatorOutstandingRewards; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorOutstandingRewards { - const message = { - ...baseValidatorOutstandingRewards, - } as ValidatorOutstandingRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorOutstandingRewards): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorOutstandingRewards { - const message = { - ...baseValidatorOutstandingRewards, - } as ValidatorOutstandingRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseValidatorSlashEvent: object = { validatorPeriod: 0, fraction: "" }; - -export const ValidatorSlashEvent = { - encode( - message: ValidatorSlashEvent, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorPeriod !== 0) { - writer.uint32(8).uint64(message.validatorPeriod); - } - if (message.fraction !== "") { - writer.uint32(18).string(message.fraction); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvent { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorPeriod = longToNumber(reader.uint64() as Long); - break; - case 2: - message.fraction = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSlashEvent { - const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent; - if ( - object.validatorPeriod !== undefined && - object.validatorPeriod !== null - ) { - message.validatorPeriod = Number(object.validatorPeriod); - } else { - message.validatorPeriod = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = String(object.fraction); - } else { - message.fraction = ""; - } - return message; - }, - - toJSON(message: ValidatorSlashEvent): unknown { - const obj: any = {}; - message.validatorPeriod !== undefined && - (obj.validatorPeriod = message.validatorPeriod); - message.fraction !== undefined && (obj.fraction = message.fraction); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSlashEvent { - const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent; - if ( - object.validatorPeriod !== undefined && - object.validatorPeriod !== null - ) { - message.validatorPeriod = object.validatorPeriod; - } else { - message.validatorPeriod = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = object.fraction; - } else { - message.fraction = ""; - } - return message; - }, -}; - -const baseValidatorSlashEvents: object = {}; - -export const ValidatorSlashEvents = { - encode( - message: ValidatorSlashEvents, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validatorSlashEvents) { - ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvents { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents; - message.validatorSlashEvents = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorSlashEvents.push( - ValidatorSlashEvent.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSlashEvents { - const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents; - message.validatorSlashEvents = []; - if ( - object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null - ) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEvent.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorSlashEvents): unknown { - const obj: any = {}; - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => - e ? ValidatorSlashEvent.toJSON(e) : undefined - ); - } else { - obj.validatorSlashEvents = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSlashEvents { - const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents; - message.validatorSlashEvents = []; - if ( - object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null - ) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEvent.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFeePool: object = {}; - -export const FeePool = { - encode(message: FeePool, writer: Writer = Writer.create()): Writer { - for (const v of message.communityPool) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FeePool { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFeePool } as FeePool; - message.communityPool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityPool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FeePool { - const message = { ...baseFeePool } as FeePool; - message.communityPool = []; - if (object.communityPool !== undefined && object.communityPool !== null) { - for (const e of object.communityPool) { - message.communityPool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FeePool): unknown { - const obj: any = {}; - if (message.communityPool) { - obj.communityPool = message.communityPool.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.communityPool = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FeePool { - const message = { ...baseFeePool } as FeePool; - message.communityPool = []; - if (object.communityPool !== undefined && object.communityPool !== null) { - for (const e of object.communityPool) { - message.communityPool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommunityPoolSpendProposal: object = { - title: "", - description: "", - recipient: "", -}; - -export const CommunityPoolSpendProposal = { - encode( - message: CommunityPoolSpendProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CommunityPoolSpendProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposal, - } as CommunityPoolSpendProposal; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommunityPoolSpendProposal { - const message = { - ...baseCommunityPoolSpendProposal, - } as CommunityPoolSpendProposal; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: CommunityPoolSpendProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): CommunityPoolSpendProposal { - const message = { - ...baseCommunityPoolSpendProposal, - } as CommunityPoolSpendProposal; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDelegatorStartingInfo: object = { - previousPeriod: 0, - stake: "", - height: 0, -}; - -export const DelegatorStartingInfo = { - encode( - message: DelegatorStartingInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.previousPeriod !== 0) { - writer.uint32(8).uint64(message.previousPeriod); - } - if (message.stake !== "") { - writer.uint32(18).string(message.stake); - } - if (message.height !== 0) { - writer.uint32(24).uint64(message.height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelegatorStartingInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.previousPeriod = longToNumber(reader.uint64() as Long); - break; - case 2: - message.stake = reader.string(); - break; - case 3: - message.height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegatorStartingInfo { - const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo; - if (object.previousPeriod !== undefined && object.previousPeriod !== null) { - message.previousPeriod = Number(object.previousPeriod); - } else { - message.previousPeriod = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = String(object.stake); - } else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: DelegatorStartingInfo): unknown { - const obj: any = {}; - message.previousPeriod !== undefined && - (obj.previousPeriod = message.previousPeriod); - message.stake !== undefined && (obj.stake = message.stake); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegatorStartingInfo { - const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo; - if (object.previousPeriod !== undefined && object.previousPeriod !== null) { - message.previousPeriod = object.previousPeriod; - } else { - message.previousPeriod = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = object.stake; - } else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseDelegationDelegatorReward: object = { validatorAddress: "" }; - -export const DelegationDelegatorReward = { - encode( - message: DelegationDelegatorReward, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.reward) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DelegationDelegatorReward { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegationDelegatorReward, - } as DelegationDelegatorReward; - message.reward = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.reward.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegationDelegatorReward { - const message = { - ...baseDelegationDelegatorReward, - } as DelegationDelegatorReward; - message.reward = []; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: DelegationDelegatorReward): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.reward) { - obj.reward = message.reward.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.reward = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegationDelegatorReward { - const message = { - ...baseDelegationDelegatorReward, - } as DelegationDelegatorReward; - message.reward = []; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommunityPoolSpendProposalWithDeposit: object = { - title: "", - description: "", - recipient: "", - amount: "", - deposit: "", -}; - -export const CommunityPoolSpendProposalWithDeposit = { - encode( - message: CommunityPoolSpendProposalWithDeposit, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - if (message.amount !== "") { - writer.uint32(34).string(message.amount); - } - if (message.deposit !== "") { - writer.uint32(42).string(message.deposit); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CommunityPoolSpendProposalWithDeposit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - } as CommunityPoolSpendProposalWithDeposit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount = reader.string(); - break; - case 5: - message.deposit = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommunityPoolSpendProposalWithDeposit { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - } as CommunityPoolSpendProposalWithDeposit; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = String(object.deposit); - } else { - message.deposit = ""; - } - return message; - }, - - toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - message.amount !== undefined && (obj.amount = message.amount); - message.deposit !== undefined && (obj.deposit = message.deposit); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CommunityPoolSpendProposalWithDeposit { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - } as CommunityPoolSpendProposalWithDeposit; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = object.deposit; - } else { - message.deposit = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts deleted file mode 100644 index c044b66..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -import { ValidatorAccumulatedCommission, ValidatorHistoricalRewards, ValidatorCurrentRewards, DelegatorStartingInfo, ValidatorSlashEvent, Params, FeePool } from "../../../cosmos/distribution/v1beta1/distribution"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfo { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** withdraw_address is the address to withdraw the delegation rewards to. */ - withdrawAddress: string; -} -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** outstanding_rewards represents the oustanding rewards of a validator. */ - outstandingRewards: DecCoin[]; -} -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** accumulated is the accumulated commission of a validator. */ - accumulated: ValidatorAccumulatedCommission | undefined; -} -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** period defines the period the historical rewards apply to. */ - period: number; - /** rewards defines the historical rewards of a validator. */ - rewards: ValidatorHistoricalRewards | undefined; -} -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** rewards defines the current rewards of a validator. */ - rewards: ValidatorCurrentRewards | undefined; -} -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecord { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** starting_info defines the starting info of a delegator. */ - startingInfo: DelegatorStartingInfo | undefined; -} -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** height defines the block height at which the slash event occured. */ - height: number; - /** period is the period of the slash event. */ - period: number; - /** validator_slash_event describes the slash event. */ - validatorSlashEvent: ValidatorSlashEvent | undefined; -} -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** fee_pool defines the fee pool at genesis. */ - feePool: FeePool | undefined; - /** fee_pool defines the delegator withdraw infos at genesis. */ - delegatorWithdrawInfos: DelegatorWithdrawInfo[]; - /** fee_pool defines the previous proposer at genesis. */ - previousProposer: string; - /** fee_pool defines the outstanding rewards of all validators at genesis. */ - outstandingRewards: ValidatorOutstandingRewardsRecord[]; - /** fee_pool defines the accumulated commisions of all validators at genesis. */ - validatorAccumulatedCommissions: ValidatorAccumulatedCommissionRecord[]; - /** fee_pool defines the historical rewards of all validators at genesis. */ - validatorHistoricalRewards: ValidatorHistoricalRewardsRecord[]; - /** fee_pool defines the current rewards of all validators at genesis. */ - validatorCurrentRewards: ValidatorCurrentRewardsRecord[]; - /** fee_pool defines the delegator starting infos at genesis. */ - delegatorStartingInfos: DelegatorStartingInfoRecord[]; - /** fee_pool defines the validator slash events at genesis. */ - validatorSlashEvents: ValidatorSlashEventRecord[]; -} -export declare const DelegatorWithdrawInfo: { - encode(message: DelegatorWithdrawInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegatorWithdrawInfo; - fromJSON(object: any): DelegatorWithdrawInfo; - toJSON(message: DelegatorWithdrawInfo): unknown; - fromPartial(object: DeepPartial): DelegatorWithdrawInfo; -}; -export declare const ValidatorOutstandingRewardsRecord: { - encode(message: ValidatorOutstandingRewardsRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorOutstandingRewardsRecord; - fromJSON(object: any): ValidatorOutstandingRewardsRecord; - toJSON(message: ValidatorOutstandingRewardsRecord): unknown; - fromPartial(object: DeepPartial): ValidatorOutstandingRewardsRecord; -}; -export declare const ValidatorAccumulatedCommissionRecord: { - encode(message: ValidatorAccumulatedCommissionRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorAccumulatedCommissionRecord; - fromJSON(object: any): ValidatorAccumulatedCommissionRecord; - toJSON(message: ValidatorAccumulatedCommissionRecord): unknown; - fromPartial(object: DeepPartial): ValidatorAccumulatedCommissionRecord; -}; -export declare const ValidatorHistoricalRewardsRecord: { - encode(message: ValidatorHistoricalRewardsRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorHistoricalRewardsRecord; - fromJSON(object: any): ValidatorHistoricalRewardsRecord; - toJSON(message: ValidatorHistoricalRewardsRecord): unknown; - fromPartial(object: DeepPartial): ValidatorHistoricalRewardsRecord; -}; -export declare const ValidatorCurrentRewardsRecord: { - encode(message: ValidatorCurrentRewardsRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorCurrentRewardsRecord; - fromJSON(object: any): ValidatorCurrentRewardsRecord; - toJSON(message: ValidatorCurrentRewardsRecord): unknown; - fromPartial(object: DeepPartial): ValidatorCurrentRewardsRecord; -}; -export declare const DelegatorStartingInfoRecord: { - encode(message: DelegatorStartingInfoRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegatorStartingInfoRecord; - fromJSON(object: any): DelegatorStartingInfoRecord; - toJSON(message: DelegatorStartingInfoRecord): unknown; - fromPartial(object: DeepPartial): DelegatorStartingInfoRecord; -}; -export declare const ValidatorSlashEventRecord: { - encode(message: ValidatorSlashEventRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEventRecord; - fromJSON(object: any): ValidatorSlashEventRecord; - toJSON(message: ValidatorSlashEventRecord): unknown; - fromPartial(object: DeepPartial): ValidatorSlashEventRecord; -}; -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js deleted file mode 100644 index 4559c05..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js +++ /dev/null @@ -1,981 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -import { ValidatorAccumulatedCommission, ValidatorHistoricalRewards, ValidatorCurrentRewards, DelegatorStartingInfo, ValidatorSlashEvent, Params, FeePool, } from "../../../cosmos/distribution/v1beta1/distribution"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseDelegatorWithdrawInfo = { - delegatorAddress: "", - withdrawAddress: "", -}; -export const DelegatorWithdrawInfo = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorWithdrawInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegatorWithdrawInfo }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = String(object.withdrawAddress); - } - else { - message.withdrawAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegatorWithdrawInfo }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = object.withdrawAddress; - } - else { - message.withdrawAddress = ""; - } - return message; - }, -}; -const baseValidatorOutstandingRewardsRecord = { validatorAddress: "" }; -export const ValidatorOutstandingRewardsRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.outstandingRewards) { - DecCoin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewardsRecord, - }; - message.outstandingRewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.outstandingRewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorOutstandingRewardsRecord, - }; - message.outstandingRewards = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.outstandingRewards = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorOutstandingRewardsRecord, - }; - message.outstandingRewards = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseValidatorAccumulatedCommissionRecord = { - validatorAddress: "", -}; -export const ValidatorAccumulatedCommissionRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.accumulated !== undefined) { - ValidatorAccumulatedCommission.encode(message.accumulated, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommissionRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.accumulated = ValidatorAccumulatedCommission.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromJSON(object.accumulated); - } - else { - message.accumulated = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.accumulated !== undefined && - (obj.accumulated = message.accumulated - ? ValidatorAccumulatedCommission.toJSON(message.accumulated) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromPartial(object.accumulated); - } - else { - message.accumulated = undefined; - } - return message; - }, -}; -const baseValidatorHistoricalRewardsRecord = { - validatorAddress: "", - period: 0, -}; -export const ValidatorHistoricalRewardsRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - if (message.rewards !== undefined) { - ValidatorHistoricalRewards.encode(message.rewards, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewardsRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.period = longToNumber(reader.uint64()); - break; - case 3: - message.rewards = ValidatorHistoricalRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorHistoricalRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } - else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromJSON(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.period !== undefined && (obj.period = message.period); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorHistoricalRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorHistoricalRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } - else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromPartial(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, -}; -const baseValidatorCurrentRewardsRecord = { validatorAddress: "" }; -export const ValidatorCurrentRewardsRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.rewards !== undefined) { - ValidatorCurrentRewards.encode(message.rewards, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewardsRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.rewards = ValidatorCurrentRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorCurrentRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromJSON(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorCurrentRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorCurrentRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromPartial(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, -}; -const baseDelegatorStartingInfoRecord = { - delegatorAddress: "", - validatorAddress: "", -}; -export const DelegatorStartingInfoRecord = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.startingInfo !== undefined) { - DelegatorStartingInfo.encode(message.startingInfo, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegatorStartingInfoRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.startingInfo = DelegatorStartingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDelegatorStartingInfoRecord, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.startingInfo !== undefined && object.startingInfo !== null) { - message.startingInfo = DelegatorStartingInfo.fromJSON(object.startingInfo); - } - else { - message.startingInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.startingInfo !== undefined && - (obj.startingInfo = message.startingInfo - ? DelegatorStartingInfo.toJSON(message.startingInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDelegatorStartingInfoRecord, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.startingInfo !== undefined && object.startingInfo !== null) { - message.startingInfo = DelegatorStartingInfo.fromPartial(object.startingInfo); - } - else { - message.startingInfo = undefined; - } - return message; - }, -}; -const baseValidatorSlashEventRecord = { - validatorAddress: "", - height: 0, - period: 0, -}; -export const ValidatorSlashEventRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.height !== 0) { - writer.uint32(16).uint64(message.height); - } - if (message.period !== 0) { - writer.uint32(24).uint64(message.period); - } - if (message.validatorSlashEvent !== undefined) { - ValidatorSlashEvent.encode(message.validatorSlashEvent, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorSlashEventRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.height = longToNumber(reader.uint64()); - break; - case 3: - message.period = longToNumber(reader.uint64()); - break; - case 4: - message.validatorSlashEvent = ValidatorSlashEvent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorSlashEventRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } - else { - message.period = 0; - } - if (object.validatorSlashEvent !== undefined && - object.validatorSlashEvent !== null) { - message.validatorSlashEvent = ValidatorSlashEvent.fromJSON(object.validatorSlashEvent); - } - else { - message.validatorSlashEvent = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.height !== undefined && (obj.height = message.height); - message.period !== undefined && (obj.period = message.period); - message.validatorSlashEvent !== undefined && - (obj.validatorSlashEvent = message.validatorSlashEvent - ? ValidatorSlashEvent.toJSON(message.validatorSlashEvent) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorSlashEventRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } - else { - message.period = 0; - } - if (object.validatorSlashEvent !== undefined && - object.validatorSlashEvent !== null) { - message.validatorSlashEvent = ValidatorSlashEvent.fromPartial(object.validatorSlashEvent); - } - else { - message.validatorSlashEvent = undefined; - } - return message; - }, -}; -const baseGenesisState = { previousProposer: "" }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.feePool !== undefined) { - FeePool.encode(message.feePool, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatorWithdrawInfos) { - DelegatorWithdrawInfo.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.previousProposer !== "") { - writer.uint32(34).string(message.previousProposer); - } - for (const v of message.outstandingRewards) { - ValidatorOutstandingRewardsRecord.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.validatorAccumulatedCommissions) { - ValidatorAccumulatedCommissionRecord.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.validatorHistoricalRewards) { - ValidatorHistoricalRewardsRecord.encode(v, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.validatorCurrentRewards) { - ValidatorCurrentRewardsRecord.encode(v, writer.uint32(66).fork()).ldelim(); - } - for (const v of message.delegatorStartingInfos) { - DelegatorStartingInfoRecord.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.validatorSlashEvents) { - ValidatorSlashEventRecord.encode(v, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.feePool = FeePool.decode(reader, reader.uint32()); - break; - case 3: - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.decode(reader, reader.uint32())); - break; - case 4: - message.previousProposer = reader.string(); - break; - case 5: - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32())); - break; - case 7: - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32())); - break; - case 8: - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.decode(reader, reader.uint32())); - break; - case 9: - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.decode(reader, reader.uint32())); - break; - case 10: - message.validatorSlashEvents.push(ValidatorSlashEventRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.feePool !== undefined && object.feePool !== null) { - message.feePool = FeePool.fromJSON(object.feePool); - } - else { - message.feePool = undefined; - } - if (object.delegatorWithdrawInfos !== undefined && - object.delegatorWithdrawInfos !== null) { - for (const e of object.delegatorWithdrawInfos) { - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.fromJSON(e)); - } - } - if (object.previousProposer !== undefined && - object.previousProposer !== null) { - message.previousProposer = String(object.previousProposer); - } - else { - message.previousProposer = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.fromJSON(e)); - } - } - if (object.validatorAccumulatedCommissions !== undefined && - object.validatorAccumulatedCommissions !== null) { - for (const e of object.validatorAccumulatedCommissions) { - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.fromJSON(e)); - } - } - if (object.validatorHistoricalRewards !== undefined && - object.validatorHistoricalRewards !== null) { - for (const e of object.validatorHistoricalRewards) { - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.fromJSON(e)); - } - } - if (object.validatorCurrentRewards !== undefined && - object.validatorCurrentRewards !== null) { - for (const e of object.validatorCurrentRewards) { - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.fromJSON(e)); - } - } - if (object.delegatorStartingInfos !== undefined && - object.delegatorStartingInfos !== null) { - for (const e of object.delegatorStartingInfos) { - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.fromJSON(e)); - } - } - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEventRecord.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.feePool !== undefined && - (obj.feePool = message.feePool - ? FeePool.toJSON(message.feePool) - : undefined); - if (message.delegatorWithdrawInfos) { - obj.delegatorWithdrawInfos = message.delegatorWithdrawInfos.map((e) => e ? DelegatorWithdrawInfo.toJSON(e) : undefined); - } - else { - obj.delegatorWithdrawInfos = []; - } - message.previousProposer !== undefined && - (obj.previousProposer = message.previousProposer); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map((e) => e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined); - } - else { - obj.outstandingRewards = []; - } - if (message.validatorAccumulatedCommissions) { - obj.validatorAccumulatedCommissions = message.validatorAccumulatedCommissions.map((e) => (e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined)); - } - else { - obj.validatorAccumulatedCommissions = []; - } - if (message.validatorHistoricalRewards) { - obj.validatorHistoricalRewards = message.validatorHistoricalRewards.map((e) => (e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined)); - } - else { - obj.validatorHistoricalRewards = []; - } - if (message.validatorCurrentRewards) { - obj.validatorCurrentRewards = message.validatorCurrentRewards.map((e) => e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined); - } - else { - obj.validatorCurrentRewards = []; - } - if (message.delegatorStartingInfos) { - obj.delegatorStartingInfos = message.delegatorStartingInfos.map((e) => e ? DelegatorStartingInfoRecord.toJSON(e) : undefined); - } - else { - obj.delegatorStartingInfos = []; - } - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEventRecord.toJSON(e) : undefined); - } - else { - obj.validatorSlashEvents = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.feePool !== undefined && object.feePool !== null) { - message.feePool = FeePool.fromPartial(object.feePool); - } - else { - message.feePool = undefined; - } - if (object.delegatorWithdrawInfos !== undefined && - object.delegatorWithdrawInfos !== null) { - for (const e of object.delegatorWithdrawInfos) { - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.fromPartial(e)); - } - } - if (object.previousProposer !== undefined && - object.previousProposer !== null) { - message.previousProposer = object.previousProposer; - } - else { - message.previousProposer = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.fromPartial(e)); - } - } - if (object.validatorAccumulatedCommissions !== undefined && - object.validatorAccumulatedCommissions !== null) { - for (const e of object.validatorAccumulatedCommissions) { - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.fromPartial(e)); - } - } - if (object.validatorHistoricalRewards !== undefined && - object.validatorHistoricalRewards !== null) { - for (const e of object.validatorHistoricalRewards) { - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.fromPartial(e)); - } - } - if (object.validatorCurrentRewards !== undefined && - object.validatorCurrentRewards !== null) { - for (const e of object.validatorCurrentRewards) { - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.fromPartial(e)); - } - } - if (object.delegatorStartingInfos !== undefined && - object.delegatorStartingInfos !== null) { - for (const e of object.delegatorStartingInfos) { - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.fromPartial(e)); - } - } - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEventRecord.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts deleted file mode 100644 index db8c7b4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts +++ /dev/null @@ -1,1341 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -import { - ValidatorAccumulatedCommission, - ValidatorHistoricalRewards, - ValidatorCurrentRewards, - DelegatorStartingInfo, - ValidatorSlashEvent, - Params, - FeePool, -} from "../../../cosmos/distribution/v1beta1/distribution"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfo { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** withdraw_address is the address to withdraw the delegation rewards to. */ - withdrawAddress: string; -} - -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** outstanding_rewards represents the oustanding rewards of a validator. */ - outstandingRewards: DecCoin[]; -} - -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** accumulated is the accumulated commission of a validator. */ - accumulated: ValidatorAccumulatedCommission | undefined; -} - -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** period defines the period the historical rewards apply to. */ - period: number; - /** rewards defines the historical rewards of a validator. */ - rewards: ValidatorHistoricalRewards | undefined; -} - -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** rewards defines the current rewards of a validator. */ - rewards: ValidatorCurrentRewards | undefined; -} - -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecord { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** starting_info defines the starting info of a delegator. */ - startingInfo: DelegatorStartingInfo | undefined; -} - -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** height defines the block height at which the slash event occured. */ - height: number; - /** period is the period of the slash event. */ - period: number; - /** validator_slash_event describes the slash event. */ - validatorSlashEvent: ValidatorSlashEvent | undefined; -} - -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** fee_pool defines the fee pool at genesis. */ - feePool: FeePool | undefined; - /** fee_pool defines the delegator withdraw infos at genesis. */ - delegatorWithdrawInfos: DelegatorWithdrawInfo[]; - /** fee_pool defines the previous proposer at genesis. */ - previousProposer: string; - /** fee_pool defines the outstanding rewards of all validators at genesis. */ - outstandingRewards: ValidatorOutstandingRewardsRecord[]; - /** fee_pool defines the accumulated commisions of all validators at genesis. */ - validatorAccumulatedCommissions: ValidatorAccumulatedCommissionRecord[]; - /** fee_pool defines the historical rewards of all validators at genesis. */ - validatorHistoricalRewards: ValidatorHistoricalRewardsRecord[]; - /** fee_pool defines the current rewards of all validators at genesis. */ - validatorCurrentRewards: ValidatorCurrentRewardsRecord[]; - /** fee_pool defines the delegator starting infos at genesis. */ - delegatorStartingInfos: DelegatorStartingInfoRecord[]; - /** fee_pool defines the validator slash events at genesis. */ - validatorSlashEvents: ValidatorSlashEventRecord[]; -} - -const baseDelegatorWithdrawInfo: object = { - delegatorAddress: "", - withdrawAddress: "", -}; - -export const DelegatorWithdrawInfo = { - encode( - message: DelegatorWithdrawInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelegatorWithdrawInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorWithdrawInfo } as DelegatorWithdrawInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegatorWithdrawInfo { - const message = { ...baseDelegatorWithdrawInfo } as DelegatorWithdrawInfo; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.withdrawAddress !== undefined && - object.withdrawAddress !== null - ) { - message.withdrawAddress = String(object.withdrawAddress); - } else { - message.withdrawAddress = ""; - } - return message; - }, - - toJSON(message: DelegatorWithdrawInfo): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegatorWithdrawInfo { - const message = { ...baseDelegatorWithdrawInfo } as DelegatorWithdrawInfo; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.withdrawAddress !== undefined && - object.withdrawAddress !== null - ) { - message.withdrawAddress = object.withdrawAddress; - } else { - message.withdrawAddress = ""; - } - return message; - }, -}; - -const baseValidatorOutstandingRewardsRecord: object = { validatorAddress: "" }; - -export const ValidatorOutstandingRewardsRecord = { - encode( - message: ValidatorOutstandingRewardsRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.outstandingRewards) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorOutstandingRewardsRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewardsRecord, - } as ValidatorOutstandingRewardsRecord; - message.outstandingRewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.outstandingRewards.push( - DecCoin.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorOutstandingRewardsRecord { - const message = { - ...baseValidatorOutstandingRewardsRecord, - } as ValidatorOutstandingRewardsRecord; - message.outstandingRewards = []; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if ( - object.outstandingRewards !== undefined && - object.outstandingRewards !== null - ) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorOutstandingRewardsRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.outstandingRewards = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorOutstandingRewardsRecord { - const message = { - ...baseValidatorOutstandingRewardsRecord, - } as ValidatorOutstandingRewardsRecord; - message.outstandingRewards = []; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if ( - object.outstandingRewards !== undefined && - object.outstandingRewards !== null - ) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseValidatorAccumulatedCommissionRecord: object = { - validatorAddress: "", -}; - -export const ValidatorAccumulatedCommissionRecord = { - encode( - message: ValidatorAccumulatedCommissionRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.accumulated !== undefined) { - ValidatorAccumulatedCommission.encode( - message.accumulated, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorAccumulatedCommissionRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommissionRecord, - } as ValidatorAccumulatedCommissionRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.accumulated = ValidatorAccumulatedCommission.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorAccumulatedCommissionRecord { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - } as ValidatorAccumulatedCommissionRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromJSON( - object.accumulated - ); - } else { - message.accumulated = undefined; - } - return message; - }, - - toJSON(message: ValidatorAccumulatedCommissionRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.accumulated !== undefined && - (obj.accumulated = message.accumulated - ? ValidatorAccumulatedCommission.toJSON(message.accumulated) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorAccumulatedCommissionRecord { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - } as ValidatorAccumulatedCommissionRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromPartial( - object.accumulated - ); - } else { - message.accumulated = undefined; - } - return message; - }, -}; - -const baseValidatorHistoricalRewardsRecord: object = { - validatorAddress: "", - period: 0, -}; - -export const ValidatorHistoricalRewardsRecord = { - encode( - message: ValidatorHistoricalRewardsRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - if (message.rewards !== undefined) { - ValidatorHistoricalRewards.encode( - message.rewards, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorHistoricalRewardsRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewardsRecord, - } as ValidatorHistoricalRewardsRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.period = longToNumber(reader.uint64() as Long); - break; - case 3: - message.rewards = ValidatorHistoricalRewards.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorHistoricalRewardsRecord { - const message = { - ...baseValidatorHistoricalRewardsRecord, - } as ValidatorHistoricalRewardsRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromJSON(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, - - toJSON(message: ValidatorHistoricalRewardsRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.period !== undefined && (obj.period = message.period); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorHistoricalRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorHistoricalRewardsRecord { - const message = { - ...baseValidatorHistoricalRewardsRecord, - } as ValidatorHistoricalRewardsRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromPartial(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, -}; - -const baseValidatorCurrentRewardsRecord: object = { validatorAddress: "" }; - -export const ValidatorCurrentRewardsRecord = { - encode( - message: ValidatorCurrentRewardsRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.rewards !== undefined) { - ValidatorCurrentRewards.encode( - message.rewards, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorCurrentRewardsRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewardsRecord, - } as ValidatorCurrentRewardsRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.rewards = ValidatorCurrentRewards.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorCurrentRewardsRecord { - const message = { - ...baseValidatorCurrentRewardsRecord, - } as ValidatorCurrentRewardsRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromJSON(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, - - toJSON(message: ValidatorCurrentRewardsRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorCurrentRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorCurrentRewardsRecord { - const message = { - ...baseValidatorCurrentRewardsRecord, - } as ValidatorCurrentRewardsRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromPartial(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, -}; - -const baseDelegatorStartingInfoRecord: object = { - delegatorAddress: "", - validatorAddress: "", -}; - -export const DelegatorStartingInfoRecord = { - encode( - message: DelegatorStartingInfoRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.startingInfo !== undefined) { - DelegatorStartingInfo.encode( - message.startingInfo, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DelegatorStartingInfoRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegatorStartingInfoRecord, - } as DelegatorStartingInfoRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.startingInfo = DelegatorStartingInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegatorStartingInfoRecord { - const message = { - ...baseDelegatorStartingInfoRecord, - } as DelegatorStartingInfoRecord; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.startingInfo !== undefined && object.startingInfo !== null) { - message.startingInfo = DelegatorStartingInfo.fromJSON( - object.startingInfo - ); - } else { - message.startingInfo = undefined; - } - return message; - }, - - toJSON(message: DelegatorStartingInfoRecord): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.startingInfo !== undefined && - (obj.startingInfo = message.startingInfo - ? DelegatorStartingInfo.toJSON(message.startingInfo) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegatorStartingInfoRecord { - const message = { - ...baseDelegatorStartingInfoRecord, - } as DelegatorStartingInfoRecord; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.startingInfo !== undefined && object.startingInfo !== null) { - message.startingInfo = DelegatorStartingInfo.fromPartial( - object.startingInfo - ); - } else { - message.startingInfo = undefined; - } - return message; - }, -}; - -const baseValidatorSlashEventRecord: object = { - validatorAddress: "", - height: 0, - period: 0, -}; - -export const ValidatorSlashEventRecord = { - encode( - message: ValidatorSlashEventRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.height !== 0) { - writer.uint32(16).uint64(message.height); - } - if (message.period !== 0) { - writer.uint32(24).uint64(message.period); - } - if (message.validatorSlashEvent !== undefined) { - ValidatorSlashEvent.encode( - message.validatorSlashEvent, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorSlashEventRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorSlashEventRecord, - } as ValidatorSlashEventRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.height = longToNumber(reader.uint64() as Long); - break; - case 3: - message.period = longToNumber(reader.uint64() as Long); - break; - case 4: - message.validatorSlashEvent = ValidatorSlashEvent.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSlashEventRecord { - const message = { - ...baseValidatorSlashEventRecord, - } as ValidatorSlashEventRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } else { - message.period = 0; - } - if ( - object.validatorSlashEvent !== undefined && - object.validatorSlashEvent !== null - ) { - message.validatorSlashEvent = ValidatorSlashEvent.fromJSON( - object.validatorSlashEvent - ); - } else { - message.validatorSlashEvent = undefined; - } - return message; - }, - - toJSON(message: ValidatorSlashEventRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.height !== undefined && (obj.height = message.height); - message.period !== undefined && (obj.period = message.period); - message.validatorSlashEvent !== undefined && - (obj.validatorSlashEvent = message.validatorSlashEvent - ? ValidatorSlashEvent.toJSON(message.validatorSlashEvent) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorSlashEventRecord { - const message = { - ...baseValidatorSlashEventRecord, - } as ValidatorSlashEventRecord; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } else { - message.period = 0; - } - if ( - object.validatorSlashEvent !== undefined && - object.validatorSlashEvent !== null - ) { - message.validatorSlashEvent = ValidatorSlashEvent.fromPartial( - object.validatorSlashEvent - ); - } else { - message.validatorSlashEvent = undefined; - } - return message; - }, -}; - -const baseGenesisState: object = { previousProposer: "" }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.feePool !== undefined) { - FeePool.encode(message.feePool, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatorWithdrawInfos) { - DelegatorWithdrawInfo.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.previousProposer !== "") { - writer.uint32(34).string(message.previousProposer); - } - for (const v of message.outstandingRewards) { - ValidatorOutstandingRewardsRecord.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.validatorAccumulatedCommissions) { - ValidatorAccumulatedCommissionRecord.encode( - v!, - writer.uint32(50).fork() - ).ldelim(); - } - for (const v of message.validatorHistoricalRewards) { - ValidatorHistoricalRewardsRecord.encode( - v!, - writer.uint32(58).fork() - ).ldelim(); - } - for (const v of message.validatorCurrentRewards) { - ValidatorCurrentRewardsRecord.encode( - v!, - writer.uint32(66).fork() - ).ldelim(); - } - for (const v of message.delegatorStartingInfos) { - DelegatorStartingInfoRecord.encode(v!, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.validatorSlashEvents) { - ValidatorSlashEventRecord.encode(v!, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.feePool = FeePool.decode(reader, reader.uint32()); - break; - case 3: - message.delegatorWithdrawInfos.push( - DelegatorWithdrawInfo.decode(reader, reader.uint32()) - ); - break; - case 4: - message.previousProposer = reader.string(); - break; - case 5: - message.outstandingRewards.push( - ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validatorAccumulatedCommissions.push( - ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32()) - ); - break; - case 7: - message.validatorHistoricalRewards.push( - ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32()) - ); - break; - case 8: - message.validatorCurrentRewards.push( - ValidatorCurrentRewardsRecord.decode(reader, reader.uint32()) - ); - break; - case 9: - message.delegatorStartingInfos.push( - DelegatorStartingInfoRecord.decode(reader, reader.uint32()) - ); - break; - case 10: - message.validatorSlashEvents.push( - ValidatorSlashEventRecord.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.feePool !== undefined && object.feePool !== null) { - message.feePool = FeePool.fromJSON(object.feePool); - } else { - message.feePool = undefined; - } - if ( - object.delegatorWithdrawInfos !== undefined && - object.delegatorWithdrawInfos !== null - ) { - for (const e of object.delegatorWithdrawInfos) { - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.fromJSON(e)); - } - } - if ( - object.previousProposer !== undefined && - object.previousProposer !== null - ) { - message.previousProposer = String(object.previousProposer); - } else { - message.previousProposer = ""; - } - if ( - object.outstandingRewards !== undefined && - object.outstandingRewards !== null - ) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push( - ValidatorOutstandingRewardsRecord.fromJSON(e) - ); - } - } - if ( - object.validatorAccumulatedCommissions !== undefined && - object.validatorAccumulatedCommissions !== null - ) { - for (const e of object.validatorAccumulatedCommissions) { - message.validatorAccumulatedCommissions.push( - ValidatorAccumulatedCommissionRecord.fromJSON(e) - ); - } - } - if ( - object.validatorHistoricalRewards !== undefined && - object.validatorHistoricalRewards !== null - ) { - for (const e of object.validatorHistoricalRewards) { - message.validatorHistoricalRewards.push( - ValidatorHistoricalRewardsRecord.fromJSON(e) - ); - } - } - if ( - object.validatorCurrentRewards !== undefined && - object.validatorCurrentRewards !== null - ) { - for (const e of object.validatorCurrentRewards) { - message.validatorCurrentRewards.push( - ValidatorCurrentRewardsRecord.fromJSON(e) - ); - } - } - if ( - object.delegatorStartingInfos !== undefined && - object.delegatorStartingInfos !== null - ) { - for (const e of object.delegatorStartingInfos) { - message.delegatorStartingInfos.push( - DelegatorStartingInfoRecord.fromJSON(e) - ); - } - } - if ( - object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null - ) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push( - ValidatorSlashEventRecord.fromJSON(e) - ); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.feePool !== undefined && - (obj.feePool = message.feePool - ? FeePool.toJSON(message.feePool) - : undefined); - if (message.delegatorWithdrawInfos) { - obj.delegatorWithdrawInfos = message.delegatorWithdrawInfos.map((e) => - e ? DelegatorWithdrawInfo.toJSON(e) : undefined - ); - } else { - obj.delegatorWithdrawInfos = []; - } - message.previousProposer !== undefined && - (obj.previousProposer = message.previousProposer); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map((e) => - e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined - ); - } else { - obj.outstandingRewards = []; - } - if (message.validatorAccumulatedCommissions) { - obj.validatorAccumulatedCommissions = message.validatorAccumulatedCommissions.map( - (e) => (e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined) - ); - } else { - obj.validatorAccumulatedCommissions = []; - } - if (message.validatorHistoricalRewards) { - obj.validatorHistoricalRewards = message.validatorHistoricalRewards.map( - (e) => (e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined) - ); - } else { - obj.validatorHistoricalRewards = []; - } - if (message.validatorCurrentRewards) { - obj.validatorCurrentRewards = message.validatorCurrentRewards.map((e) => - e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined - ); - } else { - obj.validatorCurrentRewards = []; - } - if (message.delegatorStartingInfos) { - obj.delegatorStartingInfos = message.delegatorStartingInfos.map((e) => - e ? DelegatorStartingInfoRecord.toJSON(e) : undefined - ); - } else { - obj.delegatorStartingInfos = []; - } - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => - e ? ValidatorSlashEventRecord.toJSON(e) : undefined - ); - } else { - obj.validatorSlashEvents = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.feePool !== undefined && object.feePool !== null) { - message.feePool = FeePool.fromPartial(object.feePool); - } else { - message.feePool = undefined; - } - if ( - object.delegatorWithdrawInfos !== undefined && - object.delegatorWithdrawInfos !== null - ) { - for (const e of object.delegatorWithdrawInfos) { - message.delegatorWithdrawInfos.push( - DelegatorWithdrawInfo.fromPartial(e) - ); - } - } - if ( - object.previousProposer !== undefined && - object.previousProposer !== null - ) { - message.previousProposer = object.previousProposer; - } else { - message.previousProposer = ""; - } - if ( - object.outstandingRewards !== undefined && - object.outstandingRewards !== null - ) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push( - ValidatorOutstandingRewardsRecord.fromPartial(e) - ); - } - } - if ( - object.validatorAccumulatedCommissions !== undefined && - object.validatorAccumulatedCommissions !== null - ) { - for (const e of object.validatorAccumulatedCommissions) { - message.validatorAccumulatedCommissions.push( - ValidatorAccumulatedCommissionRecord.fromPartial(e) - ); - } - } - if ( - object.validatorHistoricalRewards !== undefined && - object.validatorHistoricalRewards !== null - ) { - for (const e of object.validatorHistoricalRewards) { - message.validatorHistoricalRewards.push( - ValidatorHistoricalRewardsRecord.fromPartial(e) - ); - } - } - if ( - object.validatorCurrentRewards !== undefined && - object.validatorCurrentRewards !== null - ) { - for (const e of object.validatorCurrentRewards) { - message.validatorCurrentRewards.push( - ValidatorCurrentRewardsRecord.fromPartial(e) - ); - } - } - if ( - object.delegatorStartingInfos !== undefined && - object.delegatorStartingInfos !== null - ) { - for (const e of object.delegatorStartingInfos) { - message.delegatorStartingInfos.push( - DelegatorStartingInfoRecord.fromPartial(e) - ); - } - } - if ( - object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null - ) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push( - ValidatorSlashEventRecord.fromPartial(e) - ); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts deleted file mode 100644 index a6bb2e3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params, ValidatorOutstandingRewards, ValidatorAccumulatedCommission, ValidatorSlashEvent, DelegationDelegatorReward } from "../../../cosmos/distribution/v1beta1/distribution"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponse { - rewards: ValidatorOutstandingRewards | undefined; -} -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission: ValidatorAccumulatedCommission | undefined; -} -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; - /** starting_height defines the optional starting height to query the slashes. */ - startingHeight: number; - /** starting_height defines the optional ending height to query the slashes. */ - endingHeight: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes: ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards: DecCoin[]; -} -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards: DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total: DecCoin[]; -} -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators: string[]; -} -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress: string; -} -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequest { -} -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool: DecCoin[]; -} -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryValidatorOutstandingRewardsRequest: { - encode(message: QueryValidatorOutstandingRewardsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsRequest; - fromJSON(object: any): QueryValidatorOutstandingRewardsRequest; - toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorOutstandingRewardsRequest; -}; -export declare const QueryValidatorOutstandingRewardsResponse: { - encode(message: QueryValidatorOutstandingRewardsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsResponse; - fromJSON(object: any): QueryValidatorOutstandingRewardsResponse; - toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorOutstandingRewardsResponse; -}; -export declare const QueryValidatorCommissionRequest: { - encode(message: QueryValidatorCommissionRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorCommissionRequest; - fromJSON(object: any): QueryValidatorCommissionRequest; - toJSON(message: QueryValidatorCommissionRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorCommissionRequest; -}; -export declare const QueryValidatorCommissionResponse: { - encode(message: QueryValidatorCommissionResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorCommissionResponse; - fromJSON(object: any): QueryValidatorCommissionResponse; - toJSON(message: QueryValidatorCommissionResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorCommissionResponse; -}; -export declare const QueryValidatorSlashesRequest: { - encode(message: QueryValidatorSlashesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorSlashesRequest; - fromJSON(object: any): QueryValidatorSlashesRequest; - toJSON(message: QueryValidatorSlashesRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorSlashesRequest; -}; -export declare const QueryValidatorSlashesResponse: { - encode(message: QueryValidatorSlashesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorSlashesResponse; - fromJSON(object: any): QueryValidatorSlashesResponse; - toJSON(message: QueryValidatorSlashesResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorSlashesResponse; -}; -export declare const QueryDelegationRewardsRequest: { - encode(message: QueryDelegationRewardsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRewardsRequest; - fromJSON(object: any): QueryDelegationRewardsRequest; - toJSON(message: QueryDelegationRewardsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegationRewardsRequest; -}; -export declare const QueryDelegationRewardsResponse: { - encode(message: QueryDelegationRewardsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRewardsResponse; - fromJSON(object: any): QueryDelegationRewardsResponse; - toJSON(message: QueryDelegationRewardsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegationRewardsResponse; -}; -export declare const QueryDelegationTotalRewardsRequest: { - encode(message: QueryDelegationTotalRewardsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationTotalRewardsRequest; - fromJSON(object: any): QueryDelegationTotalRewardsRequest; - toJSON(message: QueryDelegationTotalRewardsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsRequest; -}; -export declare const QueryDelegationTotalRewardsResponse: { - encode(message: QueryDelegationTotalRewardsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationTotalRewardsResponse; - fromJSON(object: any): QueryDelegationTotalRewardsResponse; - toJSON(message: QueryDelegationTotalRewardsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsResponse; -}; -export declare const QueryDelegatorValidatorsRequest: { - encode(message: QueryDelegatorValidatorsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest; - fromJSON(object: any): QueryDelegatorValidatorsRequest; - toJSON(message: QueryDelegatorValidatorsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest; -}; -export declare const QueryDelegatorValidatorsResponse: { - encode(message: QueryDelegatorValidatorsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse; - fromJSON(object: any): QueryDelegatorValidatorsResponse; - toJSON(message: QueryDelegatorValidatorsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse; -}; -export declare const QueryDelegatorWithdrawAddressRequest: { - encode(message: QueryDelegatorWithdrawAddressRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressRequest; - fromJSON(object: any): QueryDelegatorWithdrawAddressRequest; - toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorWithdrawAddressRequest; -}; -export declare const QueryDelegatorWithdrawAddressResponse: { - encode(message: QueryDelegatorWithdrawAddressResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressResponse; - fromJSON(object: any): QueryDelegatorWithdrawAddressResponse; - toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorWithdrawAddressResponse; -}; -export declare const QueryCommunityPoolRequest: { - encode(_: QueryCommunityPoolRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCommunityPoolRequest; - fromJSON(_: any): QueryCommunityPoolRequest; - toJSON(_: QueryCommunityPoolRequest): unknown; - fromPartial(_: DeepPartial): QueryCommunityPoolRequest; -}; -export declare const QueryCommunityPoolResponse: { - encode(message: QueryCommunityPoolResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCommunityPoolResponse; - fromJSON(object: any): QueryCommunityPoolResponse; - toJSON(message: QueryCommunityPoolResponse): unknown; - fromPartial(object: DeepPartial): QueryCommunityPoolResponse; -}; -/** Query defines the gRPC querier service for distribution module. */ -export interface Query { - /** Params queries params of the distribution module. */ - Params(request: QueryParamsRequest): Promise; - /** ValidatorOutstandingRewards queries rewards of a validator address. */ - ValidatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise; - /** ValidatorCommission queries accumulated commission for a validator. */ - ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - /** ValidatorSlashes queries slash events of a validator. */ - ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - /** DelegationRewards queries the total rewards accrued by a delegation. */ - DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - DelegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise; - /** DelegatorValidators queries the validators of a delegator. */ - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ - DelegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise; - /** CommunityPool queries the community pool coins. */ - CommunityPool(request: QueryCommunityPoolRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Params(request: QueryParamsRequest): Promise; - ValidatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise; - ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - DelegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise; - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - DelegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise; - CommunityPool(request: QueryCommunityPoolRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js deleted file mode 100644 index 9d3f90a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js +++ /dev/null @@ -1,1259 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Params, ValidatorOutstandingRewards, ValidatorAccumulatedCommission, ValidatorSlashEvent, DelegationDelegatorReward, } from "../../../cosmos/distribution/v1beta1/distribution"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryValidatorOutstandingRewardsRequest = { - validatorAddress: "", -}; -export const QueryValidatorOutstandingRewardsRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseQueryValidatorOutstandingRewardsResponse = {}; -export const QueryValidatorOutstandingRewardsResponse = { - encode(message, writer = Writer.create()) { - if (message.rewards !== undefined) { - ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards = ValidatorOutstandingRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - }; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromJSON(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorOutstandingRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - }; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromPartial(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, -}; -const baseQueryValidatorCommissionRequest = { validatorAddress: "" }; -export const QueryValidatorCommissionRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorCommissionRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorCommissionRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseQueryValidatorCommissionResponse = {}; -export const QueryValidatorCommissionResponse = { - encode(message, writer = Writer.create()) { - if (message.commission !== undefined) { - ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission = ValidatorAccumulatedCommission.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorCommissionResponse, - }; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromJSON(object.commission); - } - else { - message.commission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.commission !== undefined && - (obj.commission = message.commission - ? ValidatorAccumulatedCommission.toJSON(message.commission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorCommissionResponse, - }; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromPartial(object.commission); - } - else { - message.commission = undefined; - } - return message; - }, -}; -const baseQueryValidatorSlashesRequest = { - validatorAddress: "", - startingHeight: 0, - endingHeight: 0, -}; -export const QueryValidatorSlashesRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.startingHeight !== 0) { - writer.uint32(16).uint64(message.startingHeight); - } - if (message.endingHeight !== 0) { - writer.uint32(24).uint64(message.endingHeight); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.startingHeight = longToNumber(reader.uint64()); - break; - case 3: - message.endingHeight = longToNumber(reader.uint64()); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorSlashesRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.startingHeight !== undefined && object.startingHeight !== null) { - message.startingHeight = Number(object.startingHeight); - } - else { - message.startingHeight = 0; - } - if (object.endingHeight !== undefined && object.endingHeight !== null) { - message.endingHeight = Number(object.endingHeight); - } - else { - message.endingHeight = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.startingHeight !== undefined && - (obj.startingHeight = message.startingHeight); - message.endingHeight !== undefined && - (obj.endingHeight = message.endingHeight); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorSlashesRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.startingHeight !== undefined && object.startingHeight !== null) { - message.startingHeight = object.startingHeight; - } - else { - message.startingHeight = 0; - } - if (object.endingHeight !== undefined && object.endingHeight !== null) { - message.endingHeight = object.endingHeight; - } - else { - message.endingHeight = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorSlashesResponse = {}; -export const QueryValidatorSlashesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.slashes) { - ValidatorSlashEvent.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesResponse, - }; - message.slashes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.slashes.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorSlashesResponse, - }; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.slashes) { - obj.slashes = message.slashes.map((e) => e ? ValidatorSlashEvent.toJSON(e) : undefined); - } - else { - obj.slashes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorSlashesResponse, - }; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegationRewardsRequest = { - delegatorAddress: "", - validatorAddress: "", -}; -export const QueryDelegationRewardsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegationRewardsResponse = {}; -export const QueryDelegationRewardsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsResponse, - }; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationRewardsResponse, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationRewardsResponse, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryDelegationTotalRewardsRequest = { delegatorAddress: "" }; -export const QueryDelegationTotalRewardsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegationTotalRewardsResponse = {}; -export const QueryDelegationTotalRewardsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DelegationDelegatorReward.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.total) { - DecCoin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsResponse, - }; - message.rewards = []; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DelegationDelegatorReward.decode(reader, reader.uint32())); - break; - case 2: - message.total.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - }; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromJSON(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DelegationDelegatorReward.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } - else { - obj.total = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - }; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromPartial(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryDelegatorValidatorsRequest = { delegatorAddress: "" }; -export const QueryDelegatorValidatorsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegatorValidatorsResponse = { validators: "" }; -export const QueryDelegatorValidatorsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e); - } - else { - obj.validators = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(e); - } - } - return message; - }, -}; -const baseQueryDelegatorWithdrawAddressRequest = { - delegatorAddress: "", -}; -export const QueryDelegatorWithdrawAddressRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegatorWithdrawAddressResponse = { - withdrawAddress: "", -}; -export const QueryDelegatorWithdrawAddressResponse = { - encode(message, writer = Writer.create()) { - if (message.withdrawAddress !== "") { - writer.uint32(10).string(message.withdrawAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - }; - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = String(object.withdrawAddress); - } - else { - message.withdrawAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - }; - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = object.withdrawAddress; - } - else { - message.withdrawAddress = ""; - } - return message; - }, -}; -const baseQueryCommunityPoolRequest = {}; -export const QueryCommunityPoolRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryCommunityPoolRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryCommunityPoolRequest, - }; - return message; - }, -}; -const baseQueryCommunityPoolResponse = {}; -export const QueryCommunityPoolResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.pool) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolResponse, - }; - message.pool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryCommunityPoolResponse, - }; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pool) { - obj.pool = message.pool.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } - else { - obj.pool = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryCommunityPoolResponse, - }; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - ValidatorOutstandingRewards(request) { - const data = QueryValidatorOutstandingRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorOutstandingRewards", data); - return promise.then((data) => QueryValidatorOutstandingRewardsResponse.decode(new Reader(data))); - } - ValidatorCommission(request) { - const data = QueryValidatorCommissionRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorCommission", data); - return promise.then((data) => QueryValidatorCommissionResponse.decode(new Reader(data))); - } - ValidatorSlashes(request) { - const data = QueryValidatorSlashesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorSlashes", data); - return promise.then((data) => QueryValidatorSlashesResponse.decode(new Reader(data))); - } - DelegationRewards(request) { - const data = QueryDelegationRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegationRewards", data); - return promise.then((data) => QueryDelegationRewardsResponse.decode(new Reader(data))); - } - DelegationTotalRewards(request) { - const data = QueryDelegationTotalRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegationTotalRewards", data); - return promise.then((data) => QueryDelegationTotalRewardsResponse.decode(new Reader(data))); - } - DelegatorValidators(request) { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegatorValidators", data); - return promise.then((data) => QueryDelegatorValidatorsResponse.decode(new Reader(data))); - } - DelegatorWithdrawAddress(request) { - const data = QueryDelegatorWithdrawAddressRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegatorWithdrawAddress", data); - return promise.then((data) => QueryDelegatorWithdrawAddressResponse.decode(new Reader(data))); - } - CommunityPool(request) { - const data = QueryCommunityPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "CommunityPool", data); - return promise.then((data) => QueryCommunityPoolResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts deleted file mode 100644 index c305203..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts +++ /dev/null @@ -1,1837 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - Params, - ValidatorOutstandingRewards, - ValidatorAccumulatedCommission, - ValidatorSlashEvent, - DelegationDelegatorReward, -} from "../../../cosmos/distribution/v1beta1/distribution"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} - -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponse { - rewards: ValidatorOutstandingRewards | undefined; -} - -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} - -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission: ValidatorAccumulatedCommission | undefined; -} - -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; - /** starting_height defines the optional starting height to query the slashes. */ - startingHeight: number; - /** starting_height defines the optional ending height to query the slashes. */ - endingHeight: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes: ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} - -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards: DecCoin[]; -} - -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} - -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards: DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total: DecCoin[]; -} - -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} - -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators: string[]; -} - -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} - -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress: string; -} - -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequest {} - -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool: DecCoin[]; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryValidatorOutstandingRewardsRequest: object = { - validatorAddress: "", -}; - -export const QueryValidatorOutstandingRewardsRequest = { - encode( - message: QueryValidatorOutstandingRewardsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorOutstandingRewardsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - } as QueryValidatorOutstandingRewardsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorOutstandingRewardsRequest { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - } as QueryValidatorOutstandingRewardsRequest; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - return message; - }, - - toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorOutstandingRewardsRequest { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - } as QueryValidatorOutstandingRewardsRequest; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - return message; - }, -}; - -const baseQueryValidatorOutstandingRewardsResponse: object = {}; - -export const QueryValidatorOutstandingRewardsResponse = { - encode( - message: QueryValidatorOutstandingRewardsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.rewards !== undefined) { - ValidatorOutstandingRewards.encode( - message.rewards, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorOutstandingRewardsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - } as QueryValidatorOutstandingRewardsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards = ValidatorOutstandingRewards.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorOutstandingRewardsResponse { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - } as QueryValidatorOutstandingRewardsResponse; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromJSON(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown { - const obj: any = {}; - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorOutstandingRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorOutstandingRewardsResponse { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - } as QueryValidatorOutstandingRewardsResponse; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromPartial(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, -}; - -const baseQueryValidatorCommissionRequest: object = { validatorAddress: "" }; - -export const QueryValidatorCommissionRequest = { - encode( - message: QueryValidatorCommissionRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorCommissionRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionRequest, - } as QueryValidatorCommissionRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorCommissionRequest { - const message = { - ...baseQueryValidatorCommissionRequest, - } as QueryValidatorCommissionRequest; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - return message; - }, - - toJSON(message: QueryValidatorCommissionRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorCommissionRequest { - const message = { - ...baseQueryValidatorCommissionRequest, - } as QueryValidatorCommissionRequest; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - return message; - }, -}; - -const baseQueryValidatorCommissionResponse: object = {}; - -export const QueryValidatorCommissionResponse = { - encode( - message: QueryValidatorCommissionResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.commission !== undefined) { - ValidatorAccumulatedCommission.encode( - message.commission, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorCommissionResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionResponse, - } as QueryValidatorCommissionResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission = ValidatorAccumulatedCommission.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorCommissionResponse { - const message = { - ...baseQueryValidatorCommissionResponse, - } as QueryValidatorCommissionResponse; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromJSON( - object.commission - ); - } else { - message.commission = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorCommissionResponse): unknown { - const obj: any = {}; - message.commission !== undefined && - (obj.commission = message.commission - ? ValidatorAccumulatedCommission.toJSON(message.commission) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorCommissionResponse { - const message = { - ...baseQueryValidatorCommissionResponse, - } as QueryValidatorCommissionResponse; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromPartial( - object.commission - ); - } else { - message.commission = undefined; - } - return message; - }, -}; - -const baseQueryValidatorSlashesRequest: object = { - validatorAddress: "", - startingHeight: 0, - endingHeight: 0, -}; - -export const QueryValidatorSlashesRequest = { - encode( - message: QueryValidatorSlashesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.startingHeight !== 0) { - writer.uint32(16).uint64(message.startingHeight); - } - if (message.endingHeight !== 0) { - writer.uint32(24).uint64(message.endingHeight); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorSlashesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesRequest, - } as QueryValidatorSlashesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.startingHeight = longToNumber(reader.uint64() as Long); - break; - case 3: - message.endingHeight = longToNumber(reader.uint64() as Long); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorSlashesRequest { - const message = { - ...baseQueryValidatorSlashesRequest, - } as QueryValidatorSlashesRequest; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.startingHeight !== undefined && object.startingHeight !== null) { - message.startingHeight = Number(object.startingHeight); - } else { - message.startingHeight = 0; - } - if (object.endingHeight !== undefined && object.endingHeight !== null) { - message.endingHeight = Number(object.endingHeight); - } else { - message.endingHeight = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorSlashesRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.startingHeight !== undefined && - (obj.startingHeight = message.startingHeight); - message.endingHeight !== undefined && - (obj.endingHeight = message.endingHeight); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorSlashesRequest { - const message = { - ...baseQueryValidatorSlashesRequest, - } as QueryValidatorSlashesRequest; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.startingHeight !== undefined && object.startingHeight !== null) { - message.startingHeight = object.startingHeight; - } else { - message.startingHeight = 0; - } - if (object.endingHeight !== undefined && object.endingHeight !== null) { - message.endingHeight = object.endingHeight; - } else { - message.endingHeight = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorSlashesResponse: object = {}; - -export const QueryValidatorSlashesResponse = { - encode( - message: QueryValidatorSlashesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.slashes) { - ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorSlashesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesResponse, - } as QueryValidatorSlashesResponse; - message.slashes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.slashes.push( - ValidatorSlashEvent.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorSlashesResponse { - const message = { - ...baseQueryValidatorSlashesResponse, - } as QueryValidatorSlashesResponse; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorSlashesResponse): unknown { - const obj: any = {}; - if (message.slashes) { - obj.slashes = message.slashes.map((e) => - e ? ValidatorSlashEvent.toJSON(e) : undefined - ); - } else { - obj.slashes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorSlashesResponse { - const message = { - ...baseQueryValidatorSlashesResponse, - } as QueryValidatorSlashesResponse; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegationRewardsRequest: object = { - delegatorAddress: "", - validatorAddress: "", -}; - -export const QueryDelegationRewardsRequest = { - encode( - message: QueryDelegationRewardsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationRewardsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsRequest, - } as QueryDelegationRewardsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationRewardsRequest { - const message = { - ...baseQueryDelegationRewardsRequest, - } as QueryDelegationRewardsRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - return message; - }, - - toJSON(message: QueryDelegationRewardsRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationRewardsRequest { - const message = { - ...baseQueryDelegationRewardsRequest, - } as QueryDelegationRewardsRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - return message; - }, -}; - -const baseQueryDelegationRewardsResponse: object = {}; - -export const QueryDelegationRewardsResponse = { - encode( - message: QueryDelegationRewardsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationRewardsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsResponse, - } as QueryDelegationRewardsResponse; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationRewardsResponse { - const message = { - ...baseQueryDelegationRewardsResponse, - } as QueryDelegationRewardsResponse; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryDelegationRewardsResponse): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationRewardsResponse { - const message = { - ...baseQueryDelegationRewardsResponse, - } as QueryDelegationRewardsResponse; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryDelegationTotalRewardsRequest: object = { delegatorAddress: "" }; - -export const QueryDelegationTotalRewardsRequest = { - encode( - message: QueryDelegationTotalRewardsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationTotalRewardsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsRequest, - } as QueryDelegationTotalRewardsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationTotalRewardsRequest { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - } as QueryDelegationTotalRewardsRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - return message; - }, - - toJSON(message: QueryDelegationTotalRewardsRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationTotalRewardsRequest { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - } as QueryDelegationTotalRewardsRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - return message; - }, -}; - -const baseQueryDelegationTotalRewardsResponse: object = {}; - -export const QueryDelegationTotalRewardsResponse = { - encode( - message: QueryDelegationTotalRewardsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DelegationDelegatorReward.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.total) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationTotalRewardsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsResponse, - } as QueryDelegationTotalRewardsResponse; - message.rewards = []; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push( - DelegationDelegatorReward.decode(reader, reader.uint32()) - ); - break; - case 2: - message.total.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationTotalRewardsResponse { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - } as QueryDelegationTotalRewardsResponse; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromJSON(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryDelegationTotalRewardsResponse): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DelegationDelegatorReward.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } else { - obj.total = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationTotalRewardsResponse { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - } as QueryDelegationTotalRewardsResponse; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromPartial(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsRequest: object = { delegatorAddress: "" }; - -export const QueryDelegatorValidatorsRequest = { - encode( - message: QueryDelegatorValidatorsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsResponse: object = { validators: "" }; - -export const QueryDelegatorValidatorsResponse = { - encode( - message: QueryDelegatorValidatorsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validators) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(String(e)); - } - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e); - } else { - obj.validators = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(e); - } - } - return message; - }, -}; - -const baseQueryDelegatorWithdrawAddressRequest: object = { - delegatorAddress: "", -}; - -export const QueryDelegatorWithdrawAddressRequest = { - encode( - message: QueryDelegatorWithdrawAddressRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorWithdrawAddressRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - } as QueryDelegatorWithdrawAddressRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorWithdrawAddressRequest { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - } as QueryDelegatorWithdrawAddressRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorWithdrawAddressRequest { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - } as QueryDelegatorWithdrawAddressRequest; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - return message; - }, -}; - -const baseQueryDelegatorWithdrawAddressResponse: object = { - withdrawAddress: "", -}; - -export const QueryDelegatorWithdrawAddressResponse = { - encode( - message: QueryDelegatorWithdrawAddressResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.withdrawAddress !== "") { - writer.uint32(10).string(message.withdrawAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorWithdrawAddressResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - } as QueryDelegatorWithdrawAddressResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorWithdrawAddressResponse { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - } as QueryDelegatorWithdrawAddressResponse; - if ( - object.withdrawAddress !== undefined && - object.withdrawAddress !== null - ) { - message.withdrawAddress = String(object.withdrawAddress); - } else { - message.withdrawAddress = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown { - const obj: any = {}; - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorWithdrawAddressResponse { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - } as QueryDelegatorWithdrawAddressResponse; - if ( - object.withdrawAddress !== undefined && - object.withdrawAddress !== null - ) { - message.withdrawAddress = object.withdrawAddress; - } else { - message.withdrawAddress = ""; - } - return message; - }, -}; - -const baseQueryCommunityPoolRequest: object = {}; - -export const QueryCommunityPoolRequest = { - encode( - _: QueryCommunityPoolRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCommunityPoolRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolRequest, - } as QueryCommunityPoolRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryCommunityPoolRequest { - const message = { - ...baseQueryCommunityPoolRequest, - } as QueryCommunityPoolRequest; - return message; - }, - - toJSON(_: QueryCommunityPoolRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryCommunityPoolRequest { - const message = { - ...baseQueryCommunityPoolRequest, - } as QueryCommunityPoolRequest; - return message; - }, -}; - -const baseQueryCommunityPoolResponse: object = {}; - -export const QueryCommunityPoolResponse = { - encode( - message: QueryCommunityPoolResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.pool) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCommunityPoolResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolResponse, - } as QueryCommunityPoolResponse; - message.pool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCommunityPoolResponse { - const message = { - ...baseQueryCommunityPoolResponse, - } as QueryCommunityPoolResponse; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryCommunityPoolResponse): unknown { - const obj: any = {}; - if (message.pool) { - obj.pool = message.pool.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } else { - obj.pool = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryCommunityPoolResponse { - const message = { - ...baseQueryCommunityPoolResponse, - } as QueryCommunityPoolResponse; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -/** Query defines the gRPC querier service for distribution module. */ -export interface Query { - /** Params queries params of the distribution module. */ - Params(request: QueryParamsRequest): Promise; - /** ValidatorOutstandingRewards queries rewards of a validator address. */ - ValidatorOutstandingRewards( - request: QueryValidatorOutstandingRewardsRequest - ): Promise; - /** ValidatorCommission queries accumulated commission for a validator. */ - ValidatorCommission( - request: QueryValidatorCommissionRequest - ): Promise; - /** ValidatorSlashes queries slash events of a validator. */ - ValidatorSlashes( - request: QueryValidatorSlashesRequest - ): Promise; - /** DelegationRewards queries the total rewards accrued by a delegation. */ - DelegationRewards( - request: QueryDelegationRewardsRequest - ): Promise; - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - DelegationTotalRewards( - request: QueryDelegationTotalRewardsRequest - ): Promise; - /** DelegatorValidators queries the validators of a delegator. */ - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise; - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ - DelegatorWithdrawAddress( - request: QueryDelegatorWithdrawAddressRequest - ): Promise; - /** CommunityPool queries the community pool coins. */ - CommunityPool( - request: QueryCommunityPoolRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - ValidatorOutstandingRewards( - request: QueryValidatorOutstandingRewardsRequest - ): Promise { - const data = QueryValidatorOutstandingRewardsRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "ValidatorOutstandingRewards", - data - ); - return promise.then((data) => - QueryValidatorOutstandingRewardsResponse.decode(new Reader(data)) - ); - } - - ValidatorCommission( - request: QueryValidatorCommissionRequest - ): Promise { - const data = QueryValidatorCommissionRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "ValidatorCommission", - data - ); - return promise.then((data) => - QueryValidatorCommissionResponse.decode(new Reader(data)) - ); - } - - ValidatorSlashes( - request: QueryValidatorSlashesRequest - ): Promise { - const data = QueryValidatorSlashesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "ValidatorSlashes", - data - ); - return promise.then((data) => - QueryValidatorSlashesResponse.decode(new Reader(data)) - ); - } - - DelegationRewards( - request: QueryDelegationRewardsRequest - ): Promise { - const data = QueryDelegationRewardsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegationRewards", - data - ); - return promise.then((data) => - QueryDelegationRewardsResponse.decode(new Reader(data)) - ); - } - - DelegationTotalRewards( - request: QueryDelegationTotalRewardsRequest - ): Promise { - const data = QueryDelegationTotalRewardsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegationTotalRewards", - data - ); - return promise.then((data) => - QueryDelegationTotalRewardsResponse.decode(new Reader(data)) - ); - } - - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegatorValidators", - data - ); - return promise.then((data) => - QueryDelegatorValidatorsResponse.decode(new Reader(data)) - ); - } - - DelegatorWithdrawAddress( - request: QueryDelegatorWithdrawAddressRequest - ): Promise { - const data = QueryDelegatorWithdrawAddressRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegatorWithdrawAddress", - data - ); - return promise.then((data) => - QueryDelegatorWithdrawAddressResponse.decode(new Reader(data)) - ); - } - - CommunityPool( - request: QueryCommunityPoolRequest - ): Promise { - const data = QueryCommunityPoolRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "CommunityPool", - data - ); - return promise.then((data) => - QueryCommunityPoolResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts deleted file mode 100644 index 68440c7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddress { - delegatorAddress: string; - withdrawAddress: string; -} -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponse { -} -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorReward { - delegatorAddress: string; - validatorAddress: string; -} -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponse { -} -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommission { - validatorAddress: string; -} -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponse { -} -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPool { - amount: Coin[]; - depositor: string; -} -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponse { -} -export declare const MsgSetWithdrawAddress: { - encode(message: MsgSetWithdrawAddress, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSetWithdrawAddress; - fromJSON(object: any): MsgSetWithdrawAddress; - toJSON(message: MsgSetWithdrawAddress): unknown; - fromPartial(object: DeepPartial): MsgSetWithdrawAddress; -}; -export declare const MsgSetWithdrawAddressResponse: { - encode(_: MsgSetWithdrawAddressResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSetWithdrawAddressResponse; - fromJSON(_: any): MsgSetWithdrawAddressResponse; - toJSON(_: MsgSetWithdrawAddressResponse): unknown; - fromPartial(_: DeepPartial): MsgSetWithdrawAddressResponse; -}; -export declare const MsgWithdrawDelegatorReward: { - encode(message: MsgWithdrawDelegatorReward, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawDelegatorReward; - fromJSON(object: any): MsgWithdrawDelegatorReward; - toJSON(message: MsgWithdrawDelegatorReward): unknown; - fromPartial(object: DeepPartial): MsgWithdrawDelegatorReward; -}; -export declare const MsgWithdrawDelegatorRewardResponse: { - encode(_: MsgWithdrawDelegatorRewardResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawDelegatorRewardResponse; - fromJSON(_: any): MsgWithdrawDelegatorRewardResponse; - toJSON(_: MsgWithdrawDelegatorRewardResponse): unknown; - fromPartial(_: DeepPartial): MsgWithdrawDelegatorRewardResponse; -}; -export declare const MsgWithdrawValidatorCommission: { - encode(message: MsgWithdrawValidatorCommission, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawValidatorCommission; - fromJSON(object: any): MsgWithdrawValidatorCommission; - toJSON(message: MsgWithdrawValidatorCommission): unknown; - fromPartial(object: DeepPartial): MsgWithdrawValidatorCommission; -}; -export declare const MsgWithdrawValidatorCommissionResponse: { - encode(_: MsgWithdrawValidatorCommissionResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawValidatorCommissionResponse; - fromJSON(_: any): MsgWithdrawValidatorCommissionResponse; - toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown; - fromPartial(_: DeepPartial): MsgWithdrawValidatorCommissionResponse; -}; -export declare const MsgFundCommunityPool: { - encode(message: MsgFundCommunityPool, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgFundCommunityPool; - fromJSON(object: any): MsgFundCommunityPool; - toJSON(message: MsgFundCommunityPool): unknown; - fromPartial(object: DeepPartial): MsgFundCommunityPool; -}; -export declare const MsgFundCommunityPoolResponse: { - encode(_: MsgFundCommunityPoolResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgFundCommunityPoolResponse; - fromJSON(_: any): MsgFundCommunityPoolResponse; - toJSON(_: MsgFundCommunityPoolResponse): unknown; - fromPartial(_: DeepPartial): MsgFundCommunityPoolResponse; -}; -/** Msg defines the distribution Msg service. */ -export interface Msg { - /** - * SetWithdrawAddress defines a method to change the withdraw address - * for a delegator (or validator self-delegation). - */ - SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise; - /** - * WithdrawDelegatorReward defines a method to withdraw rewards of delegator - * from a single validator. - */ - WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; - /** - * WithdrawValidatorCommission defines a method to withdraw the - * full commission to the validator address. - */ - WithdrawValidatorCommission(request: MsgWithdrawValidatorCommission): Promise; - /** - * FundCommunityPool defines a method to allow an account to directly - * fund the community pool. - */ - FundCommunityPool(request: MsgFundCommunityPool): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise; - WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; - WithdrawValidatorCommission(request: MsgWithdrawValidatorCommission): Promise; - FundCommunityPool(request: MsgFundCommunityPool): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js deleted file mode 100644 index 0ab165b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js +++ /dev/null @@ -1,481 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseMsgSetWithdrawAddress = { - delegatorAddress: "", - withdrawAddress: "", -}; -export const MsgSetWithdrawAddress = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSetWithdrawAddress }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSetWithdrawAddress }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = String(object.withdrawAddress); - } - else { - message.withdrawAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSetWithdrawAddress }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = object.withdrawAddress; - } - else { - message.withdrawAddress = ""; - } - return message; - }, -}; -const baseMsgSetWithdrawAddressResponse = {}; -export const MsgSetWithdrawAddressResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSetWithdrawAddressResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgSetWithdrawAddressResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgSetWithdrawAddressResponse, - }; - return message; - }, -}; -const baseMsgWithdrawDelegatorReward = { - delegatorAddress: "", - validatorAddress: "", -}; -export const MsgWithdrawDelegatorReward = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorReward, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgWithdrawDelegatorReward, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgWithdrawDelegatorReward, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseMsgWithdrawDelegatorRewardResponse = {}; -export const MsgWithdrawDelegatorRewardResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - }; - return message; - }, -}; -const baseMsgWithdrawValidatorCommission = { validatorAddress: "" }; -export const MsgWithdrawValidatorCommission = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommission, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgWithdrawValidatorCommission, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgWithdrawValidatorCommission, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseMsgWithdrawValidatorCommissionResponse = {}; -export const MsgWithdrawValidatorCommissionResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - }; - return message; - }, -}; -const baseMsgFundCommunityPool = { depositor: "" }; -export const MsgFundCommunityPool = { - encode(message, writer = Writer.create()) { - for (const v of message.amount) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgFundCommunityPool }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgFundCommunityPool }; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgFundCommunityPool }; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - return message; - }, -}; -const baseMsgFundCommunityPoolResponse = {}; -export const MsgFundCommunityPoolResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgFundCommunityPoolResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgFundCommunityPoolResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgFundCommunityPoolResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - SetWithdrawAddress(request) { - const data = MsgSetWithdrawAddress.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "SetWithdrawAddress", data); - return promise.then((data) => MsgSetWithdrawAddressResponse.decode(new Reader(data))); - } - WithdrawDelegatorReward(request) { - const data = MsgWithdrawDelegatorReward.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "WithdrawDelegatorReward", data); - return promise.then((data) => MsgWithdrawDelegatorRewardResponse.decode(new Reader(data))); - } - WithdrawValidatorCommission(request) { - const data = MsgWithdrawValidatorCommission.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "WithdrawValidatorCommission", data); - return promise.then((data) => MsgWithdrawValidatorCommissionResponse.decode(new Reader(data))); - } - FundCommunityPool(request) { - const data = MsgFundCommunityPool.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "FundCommunityPool", data); - return promise.then((data) => MsgFundCommunityPoolResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts deleted file mode 100644 index ac2ec16..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts +++ /dev/null @@ -1,728 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddress { - delegatorAddress: string; - withdrawAddress: string; -} - -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponse {} - -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorReward { - delegatorAddress: string; - validatorAddress: string; -} - -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponse {} - -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommission { - validatorAddress: string; -} - -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponse {} - -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPool { - amount: Coin[]; - depositor: string; -} - -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponse {} - -const baseMsgSetWithdrawAddress: object = { - delegatorAddress: "", - withdrawAddress: "", -}; - -export const MsgSetWithdrawAddress = { - encode( - message: MsgSetWithdrawAddress, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSetWithdrawAddress { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSetWithdrawAddress { - const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.withdrawAddress !== undefined && - object.withdrawAddress !== null - ) { - message.withdrawAddress = String(object.withdrawAddress); - } else { - message.withdrawAddress = ""; - } - return message; - }, - - toJSON(message: MsgSetWithdrawAddress): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSetWithdrawAddress { - const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.withdrawAddress !== undefined && - object.withdrawAddress !== null - ) { - message.withdrawAddress = object.withdrawAddress; - } else { - message.withdrawAddress = ""; - } - return message; - }, -}; - -const baseMsgSetWithdrawAddressResponse: object = {}; - -export const MsgSetWithdrawAddressResponse = { - encode( - _: MsgSetWithdrawAddressResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSetWithdrawAddressResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSetWithdrawAddressResponse, - } as MsgSetWithdrawAddressResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgSetWithdrawAddressResponse { - const message = { - ...baseMsgSetWithdrawAddressResponse, - } as MsgSetWithdrawAddressResponse; - return message; - }, - - toJSON(_: MsgSetWithdrawAddressResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgSetWithdrawAddressResponse { - const message = { - ...baseMsgSetWithdrawAddressResponse, - } as MsgSetWithdrawAddressResponse; - return message; - }, -}; - -const baseMsgWithdrawDelegatorReward: object = { - delegatorAddress: "", - validatorAddress: "", -}; - -export const MsgWithdrawDelegatorReward = { - encode( - message: MsgWithdrawDelegatorReward, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawDelegatorReward { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorReward, - } as MsgWithdrawDelegatorReward; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgWithdrawDelegatorReward { - const message = { - ...baseMsgWithdrawDelegatorReward, - } as MsgWithdrawDelegatorReward; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - return message; - }, - - toJSON(message: MsgWithdrawDelegatorReward): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgWithdrawDelegatorReward { - const message = { - ...baseMsgWithdrawDelegatorReward, - } as MsgWithdrawDelegatorReward; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - return message; - }, -}; - -const baseMsgWithdrawDelegatorRewardResponse: object = {}; - -export const MsgWithdrawDelegatorRewardResponse = { - encode( - _: MsgWithdrawDelegatorRewardResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawDelegatorRewardResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - } as MsgWithdrawDelegatorRewardResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgWithdrawDelegatorRewardResponse { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - } as MsgWithdrawDelegatorRewardResponse; - return message; - }, - - toJSON(_: MsgWithdrawDelegatorRewardResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgWithdrawDelegatorRewardResponse { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - } as MsgWithdrawDelegatorRewardResponse; - return message; - }, -}; - -const baseMsgWithdrawValidatorCommission: object = { validatorAddress: "" }; - -export const MsgWithdrawValidatorCommission = { - encode( - message: MsgWithdrawValidatorCommission, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawValidatorCommission { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommission, - } as MsgWithdrawValidatorCommission; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgWithdrawValidatorCommission { - const message = { - ...baseMsgWithdrawValidatorCommission, - } as MsgWithdrawValidatorCommission; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - return message; - }, - - toJSON(message: MsgWithdrawValidatorCommission): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgWithdrawValidatorCommission { - const message = { - ...baseMsgWithdrawValidatorCommission, - } as MsgWithdrawValidatorCommission; - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - return message; - }, -}; - -const baseMsgWithdrawValidatorCommissionResponse: object = {}; - -export const MsgWithdrawValidatorCommissionResponse = { - encode( - _: MsgWithdrawValidatorCommissionResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawValidatorCommissionResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - } as MsgWithdrawValidatorCommissionResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgWithdrawValidatorCommissionResponse { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - } as MsgWithdrawValidatorCommissionResponse; - return message; - }, - - toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgWithdrawValidatorCommissionResponse { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - } as MsgWithdrawValidatorCommissionResponse; - return message; - }, -}; - -const baseMsgFundCommunityPool: object = { depositor: "" }; - -export const MsgFundCommunityPool = { - encode( - message: MsgFundCommunityPool, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgFundCommunityPool { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgFundCommunityPool { - const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - return message; - }, - - toJSON(message: MsgFundCommunityPool): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - - fromPartial(object: DeepPartial): MsgFundCommunityPool { - const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - return message; - }, -}; - -const baseMsgFundCommunityPoolResponse: object = {}; - -export const MsgFundCommunityPoolResponse = { - encode( - _: MsgFundCommunityPoolResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgFundCommunityPoolResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgFundCommunityPoolResponse, - } as MsgFundCommunityPoolResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgFundCommunityPoolResponse { - const message = { - ...baseMsgFundCommunityPoolResponse, - } as MsgFundCommunityPoolResponse; - return message; - }, - - toJSON(_: MsgFundCommunityPoolResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgFundCommunityPoolResponse { - const message = { - ...baseMsgFundCommunityPoolResponse, - } as MsgFundCommunityPoolResponse; - return message; - }, -}; - -/** Msg defines the distribution Msg service. */ -export interface Msg { - /** - * SetWithdrawAddress defines a method to change the withdraw address - * for a delegator (or validator self-delegation). - */ - SetWithdrawAddress( - request: MsgSetWithdrawAddress - ): Promise; - /** - * WithdrawDelegatorReward defines a method to withdraw rewards of delegator - * from a single validator. - */ - WithdrawDelegatorReward( - request: MsgWithdrawDelegatorReward - ): Promise; - /** - * WithdrawValidatorCommission defines a method to withdraw the - * full commission to the validator address. - */ - WithdrawValidatorCommission( - request: MsgWithdrawValidatorCommission - ): Promise; - /** - * FundCommunityPool defines a method to allow an account to directly - * fund the community pool. - */ - FundCommunityPool( - request: MsgFundCommunityPool - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - SetWithdrawAddress( - request: MsgSetWithdrawAddress - ): Promise { - const data = MsgSetWithdrawAddress.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "SetWithdrawAddress", - data - ); - return promise.then((data) => - MsgSetWithdrawAddressResponse.decode(new Reader(data)) - ); - } - - WithdrawDelegatorReward( - request: MsgWithdrawDelegatorReward - ): Promise { - const data = MsgWithdrawDelegatorReward.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "WithdrawDelegatorReward", - data - ); - return promise.then((data) => - MsgWithdrawDelegatorRewardResponse.decode(new Reader(data)) - ); - } - - WithdrawValidatorCommission( - request: MsgWithdrawValidatorCommission - ): Promise { - const data = MsgWithdrawValidatorCommission.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "WithdrawValidatorCommission", - data - ); - return promise.then((data) => - MsgWithdrawValidatorCommissionResponse.decode(new Reader(data)) - ); - } - - FundCommunityPool( - request: MsgFundCommunityPool - ): Promise { - const data = MsgFundCommunityPool.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "FundCommunityPool", - data - ); - return promise.then((data) => - MsgFundCommunityPoolResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js deleted file mode 100644 index 44be652..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js +++ /dev/null @@ -1,159 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { Equivocation } from "./module/types/cosmos/evidence/v1beta1/evidence"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Evidence: {}, - AllEvidence: {}, - _Structure: { - Equivocation: getStructure(Equivocation.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getEvidence: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Evidence[JSON.stringify(params)] ?? {}; - }, - getAllEvidence: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.AllEvidence[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryEvidence({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryEvidence(key.evidence_hash, query)).data : (await (await initQueryClient(rootGetters)).queryEvidence(key.evidence_hash)).data; - commit('QUERY', { query: 'Evidence', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryEvidence', payload: { options: { all }, params: { ...key }, query } }); - return getters['getEvidence']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryEvidence', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryAllEvidence({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryAllEvidence(query)).data : (await (await initQueryClient(rootGetters)).queryAllEvidence()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryAllEvidence({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'AllEvidence', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllEvidence', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllEvidence']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryAllEvidence', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgSubmitEvidence({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitEvidence(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgSubmitEvidence({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitEvidence(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts deleted file mode 100644 index 9699452..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { Equivocation } from "./module/types/cosmos/evidence/v1beta1/evidence" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Evidence: {}, - AllEvidence: {}, - - _Structure: { - Equivocation: getStructure(Equivocation.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getEvidence: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Evidence[JSON.stringify(params)] ?? {} - }, - getAllEvidence: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.AllEvidence[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryEvidence({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryEvidence( key.evidence_hash, query)).data:(await (await initQueryClient(rootGetters)).queryEvidence( key.evidence_hash )).data - - commit('QUERY', { query: 'Evidence', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryEvidence', payload: { options: { all }, params: {...key},query }}) - return getters['getEvidence']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryEvidence', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryAllEvidence({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryAllEvidence( query)).data:(await (await initQueryClient(rootGetters)).queryAllEvidence()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryAllEvidence({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'AllEvidence', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllEvidence', payload: { options: { all }, params: {...key},query }}) - return getters['getAllEvidence']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryAllEvidence', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgSubmitEvidence({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitEvidence(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSubmitEvidence:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgSubmitEvidence({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitEvidence(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSubmitEvidence:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts deleted file mode 100644 index ac47fdb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgSubmitEvidence: (data: MsgSubmitEvidence) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js deleted file mode 100644 index ddf41e8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; -const types = [ - ["/cosmos.evidence.v1beta1.MsgSubmitEvidence", MsgSubmitEvidence], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgSubmitEvidence: (data) => ({ typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts deleted file mode 100644 index f076fc0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; - - -const types = [ - ["/cosmos.evidence.v1beta1.MsgSubmitEvidence", MsgSubmitEvidence], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgSubmitEvidence: (data: MsgSubmitEvidence): EncodeObject => ({ typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts deleted file mode 100644 index 13d7ae7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,284 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** - * MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. - */ -export interface V1Beta1MsgSubmitEvidenceResponse { - /** - * hash defines the hash of the evidence. - * @format byte - */ - hash?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** -* QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -method. -*/ -export interface V1Beta1QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence?: ProtobufAny[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryEvidenceResponse is the response type for the Query/Evidence RPC method. - */ -export interface V1Beta1QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence?: ProtobufAny; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/evidence/v1beta1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - queryAllEvidence: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryEvidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidenceHash} - */ - queryEvidence: (evidenceHash: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js deleted file mode 100644 index 6896747..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js +++ /dev/null @@ -1,169 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/evidence/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryAllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - this.queryAllEvidence = (query, params = {}) => this.request({ - path: `/cosmos/evidence/v1beta1/evidence`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryEvidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidenceHash} - */ - this.queryEvidence = (evidenceHash, params = {}) => this.request({ - path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts deleted file mode 100644 index c33b99f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts +++ /dev/null @@ -1,462 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** - * MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. - */ -export interface V1Beta1MsgSubmitEvidenceResponse { - /** - * hash defines the hash of the evidence. - * @format byte - */ - hash?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** -* QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -method. -*/ -export interface V1Beta1QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence?: ProtobufAny[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryEvidenceResponse is the response type for the Query/Evidence RPC method. - */ -export interface V1Beta1QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence?: ProtobufAny; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/evidence/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - queryAllEvidence = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/evidence/v1beta1/evidence`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryEvidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidenceHash} - */ - queryEvidence = (evidenceHash: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts deleted file mode 100644 index 6a8c752..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface Equivocation { - height: number; - time: Date | undefined; - power: number; - consensusAddress: string; -} -export declare const Equivocation: { - encode(message: Equivocation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Equivocation; - fromJSON(object: any): Equivocation; - toJSON(message: Equivocation): unknown; - fromPartial(object: DeepPartial): Equivocation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js deleted file mode 100644 index fdb566d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js +++ /dev/null @@ -1,160 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseEquivocation = { height: 0, power: 0, consensusAddress: "" }; -export const Equivocation = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(18).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - if (message.consensusAddress !== "") { - writer.uint32(34).string(message.consensusAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEquivocation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.power = longToNumber(reader.int64()); - break; - case 4: - message.consensusAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEquivocation }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - if (object.consensusAddress !== undefined && - object.consensusAddress !== null) { - message.consensusAddress = String(object.consensusAddress); - } - else { - message.consensusAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.power !== undefined && (obj.power = message.power); - message.consensusAddress !== undefined && - (obj.consensusAddress = message.consensusAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseEquivocation }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - if (object.consensusAddress !== undefined && - object.consensusAddress !== null) { - message.consensusAddress = object.consensusAddress; - } - else { - message.consensusAddress = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts deleted file mode 100644 index 30cb031..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface Equivocation { - height: number; - time: Date | undefined; - power: number; - consensusAddress: string; -} - -const baseEquivocation: object = { height: 0, power: 0, consensusAddress: "" }; - -export const Equivocation = { - encode(message: Equivocation, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - if (message.consensusAddress !== "") { - writer.uint32(34).string(message.consensusAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Equivocation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEquivocation } as Equivocation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.power = longToNumber(reader.int64() as Long); - break; - case 4: - message.consensusAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Equivocation { - const message = { ...baseEquivocation } as Equivocation; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - if ( - object.consensusAddress !== undefined && - object.consensusAddress !== null - ) { - message.consensusAddress = String(object.consensusAddress); - } else { - message.consensusAddress = ""; - } - return message; - }, - - toJSON(message: Equivocation): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.power !== undefined && (obj.power = message.power); - message.consensusAddress !== undefined && - (obj.consensusAddress = message.consensusAddress); - return obj; - }, - - fromPartial(object: DeepPartial): Equivocation { - const message = { ...baseEquivocation } as Equivocation; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - if ( - object.consensusAddress !== undefined && - object.consensusAddress !== null - ) { - message.consensusAddress = object.consensusAddress; - } else { - message.consensusAddress = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts deleted file mode 100644 index 941d6d3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisState { - /** evidence defines all the evidence at genesis. */ - evidence: Any[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js deleted file mode 100644 index 7dd4f5a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.evidence) { - Any.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => e ? Any.toJSON(e) : undefined); - } - else { - obj.evidence = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts deleted file mode 100644 index 2b65910..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* eslint-disable */ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisState { - /** evidence defines all the evidence at genesis. */ - evidence: Any[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.evidence) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.evidence = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts deleted file mode 100644 index 94a93dc..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequest { - /** evidence_hash defines the hash of the requested evidence. */ - evidenceHash: Uint8Array; -} -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence: Any | undefined; -} -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export declare const QueryEvidenceRequest: { - encode(message: QueryEvidenceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceRequest; - fromJSON(object: any): QueryEvidenceRequest; - toJSON(message: QueryEvidenceRequest): unknown; - fromPartial(object: DeepPartial): QueryEvidenceRequest; -}; -export declare const QueryEvidenceResponse: { - encode(message: QueryEvidenceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceResponse; - fromJSON(object: any): QueryEvidenceResponse; - toJSON(message: QueryEvidenceResponse): unknown; - fromPartial(object: DeepPartial): QueryEvidenceResponse; -}; -export declare const QueryAllEvidenceRequest: { - encode(message: QueryAllEvidenceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllEvidenceRequest; - fromJSON(object: any): QueryAllEvidenceRequest; - toJSON(message: QueryAllEvidenceRequest): unknown; - fromPartial(object: DeepPartial): QueryAllEvidenceRequest; -}; -export declare const QueryAllEvidenceResponse: { - encode(message: QueryAllEvidenceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllEvidenceResponse; - fromJSON(object: any): QueryAllEvidenceResponse; - toJSON(message: QueryAllEvidenceResponse): unknown; - fromPartial(object: DeepPartial): QueryAllEvidenceResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Evidence queries evidence based on evidence hash. */ - Evidence(request: QueryEvidenceRequest): Promise; - /** AllEvidence queries all evidence. */ - AllEvidence(request: QueryAllEvidenceRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Evidence(request: QueryEvidenceRequest): Promise; - AllEvidence(request: QueryAllEvidenceRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js deleted file mode 100644 index 6050a1e..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseQueryEvidenceRequest = {}; -export const QueryEvidenceRequest = { - encode(message, writer = Writer.create()) { - if (message.evidenceHash.length !== 0) { - writer.uint32(10).bytes(message.evidenceHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidenceHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryEvidenceRequest }; - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryEvidenceRequest }; - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } - else { - message.evidenceHash = new Uint8Array(); - } - return message; - }, -}; -const baseQueryEvidenceResponse = {}; -export const QueryEvidenceResponse = { - encode(message, writer = Writer.create()) { - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryEvidenceResponse }; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryEvidenceResponse }; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, -}; -const baseQueryAllEvidenceRequest = {}; -export const QueryAllEvidenceRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllEvidenceRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllEvidenceRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllEvidenceResponse = {}; -export const QueryAllEvidenceResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.evidence) { - Any.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceResponse, - }; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllEvidenceResponse, - }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => e ? Any.toJSON(e) : undefined); - } - else { - obj.evidence = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllEvidenceResponse, - }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Evidence(request) { - const data = QueryEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Query", "Evidence", data); - return promise.then((data) => QueryEvidenceResponse.decode(new Reader(data))); - } - AllEvidence(request) { - const data = QueryAllEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Query", "AllEvidence", data); - return promise.then((data) => QueryAllEvidenceResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts deleted file mode 100644 index 3c75662..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts +++ /dev/null @@ -1,429 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequest { - /** evidence_hash defines the hash of the requested evidence. */ - evidenceHash: Uint8Array; -} - -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence: Any | undefined; -} - -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -const baseQueryEvidenceRequest: object = {}; - -export const QueryEvidenceRequest = { - encode( - message: QueryEvidenceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.evidenceHash.length !== 0) { - writer.uint32(10).bytes(message.evidenceHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceRequest } as QueryEvidenceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidenceHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryEvidenceRequest { - const message = { ...baseQueryEvidenceRequest } as QueryEvidenceRequest; - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - return message; - }, - - toJSON(message: QueryEvidenceRequest): unknown { - const obj: any = {}; - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes( - message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): QueryEvidenceRequest { - const message = { ...baseQueryEvidenceRequest } as QueryEvidenceRequest; - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } else { - message.evidenceHash = new Uint8Array(); - } - return message; - }, -}; - -const baseQueryEvidenceResponse: object = {}; - -export const QueryEvidenceResponse = { - encode( - message: QueryEvidenceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceResponse } as QueryEvidenceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryEvidenceResponse { - const message = { ...baseQueryEvidenceResponse } as QueryEvidenceResponse; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, - - toJSON(message: QueryEvidenceResponse): unknown { - const obj: any = {}; - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryEvidenceResponse { - const message = { ...baseQueryEvidenceResponse } as QueryEvidenceResponse; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, -}; - -const baseQueryAllEvidenceRequest: object = {}; - -export const QueryAllEvidenceRequest = { - encode( - message: QueryAllEvidenceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllEvidenceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceRequest, - } as QueryAllEvidenceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllEvidenceRequest { - const message = { - ...baseQueryAllEvidenceRequest, - } as QueryAllEvidenceRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllEvidenceRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllEvidenceRequest { - const message = { - ...baseQueryAllEvidenceRequest, - } as QueryAllEvidenceRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllEvidenceResponse: object = {}; - -export const QueryAllEvidenceResponse = { - encode( - message: QueryAllEvidenceResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.evidence) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllEvidenceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceResponse, - } as QueryAllEvidenceResponse; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllEvidenceResponse { - const message = { - ...baseQueryAllEvidenceResponse, - } as QueryAllEvidenceResponse; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllEvidenceResponse): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.evidence = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllEvidenceResponse { - const message = { - ...baseQueryAllEvidenceResponse, - } as QueryAllEvidenceResponse; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Evidence queries evidence based on evidence hash. */ - Evidence(request: QueryEvidenceRequest): Promise; - /** AllEvidence queries all evidence. */ - AllEvidence( - request: QueryAllEvidenceRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Evidence(request: QueryEvidenceRequest): Promise { - const data = QueryEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.evidence.v1beta1.Query", - "Evidence", - data - ); - return promise.then((data) => - QueryEvidenceResponse.decode(new Reader(data)) - ); - } - - AllEvidence( - request: QueryAllEvidenceRequest - ): Promise { - const data = QueryAllEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.evidence.v1beta1.Query", - "AllEvidence", - data - ); - return promise.then((data) => - QueryAllEvidenceResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts deleted file mode 100644 index 6de885d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidence { - submitter: string; - evidence: Any | undefined; -} -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponse { - /** hash defines the hash of the evidence. */ - hash: Uint8Array; -} -export declare const MsgSubmitEvidence: { - encode(message: MsgSubmitEvidence, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitEvidence; - fromJSON(object: any): MsgSubmitEvidence; - toJSON(message: MsgSubmitEvidence): unknown; - fromPartial(object: DeepPartial): MsgSubmitEvidence; -}; -export declare const MsgSubmitEvidenceResponse: { - encode(message: MsgSubmitEvidenceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitEvidenceResponse; - fromJSON(object: any): MsgSubmitEvidenceResponse; - toJSON(message: MsgSubmitEvidenceResponse): unknown; - fromPartial(object: DeepPartial): MsgSubmitEvidenceResponse; -}; -/** Msg defines the evidence Msg service. */ -export interface Msg { - /** - * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - * counterfactual signing. - */ - SubmitEvidence(request: MsgSubmitEvidence): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - SubmitEvidence(request: MsgSubmitEvidence): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js deleted file mode 100644 index e0ba7f9..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js +++ /dev/null @@ -1,172 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseMsgSubmitEvidence = { submitter: "" }; -export const MsgSubmitEvidence = { - encode(message, writer = Writer.create()) { - if (message.submitter !== "") { - writer.uint32(10).string(message.submitter); - } - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitEvidence }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.submitter = reader.string(); - break; - case 2: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSubmitEvidence }; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = String(object.submitter); - } - else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.submitter !== undefined && (obj.submitter = message.submitter); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSubmitEvidence }; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = object.submitter; - } - else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, -}; -const baseMsgSubmitEvidenceResponse = {}; -export const MsgSubmitEvidenceResponse = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitEvidenceResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgSubmitEvidenceResponse, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgSubmitEvidenceResponse, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - SubmitEvidence(request) { - const data = MsgSubmitEvidence.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Msg", "SubmitEvidence", data); - return promise.then((data) => MsgSubmitEvidenceResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts deleted file mode 100644 index 51a891b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidence { - submitter: string; - evidence: Any | undefined; -} - -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponse { - /** hash defines the hash of the evidence. */ - hash: Uint8Array; -} - -const baseMsgSubmitEvidence: object = { submitter: "" }; - -export const MsgSubmitEvidence = { - encode(message: MsgSubmitEvidence, writer: Writer = Writer.create()): Writer { - if (message.submitter !== "") { - writer.uint32(10).string(message.submitter); - } - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSubmitEvidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitEvidence } as MsgSubmitEvidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.submitter = reader.string(); - break; - case 2: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitEvidence { - const message = { ...baseMsgSubmitEvidence } as MsgSubmitEvidence; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = String(object.submitter); - } else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, - - toJSON(message: MsgSubmitEvidence): unknown { - const obj: any = {}; - message.submitter !== undefined && (obj.submitter = message.submitter); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgSubmitEvidence { - const message = { ...baseMsgSubmitEvidence } as MsgSubmitEvidence; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = object.submitter; - } else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, -}; - -const baseMsgSubmitEvidenceResponse: object = {}; - -export const MsgSubmitEvidenceResponse = { - encode( - message: MsgSubmitEvidenceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSubmitEvidenceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitEvidenceResponse, - } as MsgSubmitEvidenceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitEvidenceResponse { - const message = { - ...baseMsgSubmitEvidenceResponse, - } as MsgSubmitEvidenceResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: MsgSubmitEvidenceResponse): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSubmitEvidenceResponse { - const message = { - ...baseMsgSubmitEvidenceResponse, - } as MsgSubmitEvidenceResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -/** Msg defines the evidence Msg service. */ -export interface Msg { - /** - * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - * counterfactual signing. - */ - SubmitEvidence( - request: MsgSubmitEvidence - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - SubmitEvidence( - request: MsgSubmitEvidence - ): Promise { - const data = MsgSubmitEvidence.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.evidence.v1beta1.Msg", - "SubmitEvidence", - data - ); - return promise.then((data) => - MsgSubmitEvidenceResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 82af3da..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 52a7265..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js deleted file mode 100644 index 1a26234..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js +++ /dev/null @@ -1,375 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { TextProposal } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Deposit } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Proposal } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TallyResult } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Vote } from "./module/types/cosmos/gov/v1beta1/gov"; -import { DepositParams } from "./module/types/cosmos/gov/v1beta1/gov"; -import { VotingParams } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TallyParams } from "./module/types/cosmos/gov/v1beta1/gov"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Proposal: {}, - Proposals: {}, - Vote: {}, - Votes: {}, - Params: {}, - Deposit: {}, - Deposits: {}, - TallyResult: {}, - _Structure: { - TextProposal: getStructure(TextProposal.fromPartial({})), - Deposit: getStructure(Deposit.fromPartial({})), - Proposal: getStructure(Proposal.fromPartial({})), - TallyResult: getStructure(TallyResult.fromPartial({})), - Vote: getStructure(Vote.fromPartial({})), - DepositParams: getStructure(DepositParams.fromPartial({})), - VotingParams: getStructure(VotingParams.fromPartial({})), - TallyParams: getStructure(TallyParams.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getProposal: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Proposal[JSON.stringify(params)] ?? {}; - }, - getProposals: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Proposals[JSON.stringify(params)] ?? {}; - }, - getVote: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Vote[JSON.stringify(params)] ?? {}; - }, - getVotes: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Votes[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getDeposit: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Deposit[JSON.stringify(params)] ?? {}; - }, - getDeposits: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Deposits[JSON.stringify(params)] ?? {}; - }, - getTallyResult: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.TallyResult[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryProposal({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryProposal(key.proposal_id, query)).data : (await (await initQueryClient(rootGetters)).queryProposal(key.proposal_id)).data; - commit('QUERY', { query: 'Proposal', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryProposal', payload: { options: { all }, params: { ...key }, query } }); - return getters['getProposal']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryProposal', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryProposals({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryProposals(query)).data : (await (await initQueryClient(rootGetters)).queryProposals()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryProposals({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Proposals', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryProposals', payload: { options: { all }, params: { ...key }, query } }); - return getters['getProposals']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryProposals', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryVote({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryVote(key.proposal_id, key.voter, query)).data : (await (await initQueryClient(rootGetters)).queryVote(key.proposal_id, key.voter)).data; - commit('QUERY', { query: 'Vote', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryVote', payload: { options: { all }, params: { ...key }, query } }); - return getters['getVote']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryVote', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryVotes({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryVotes(key.proposal_id, query)).data : (await (await initQueryClient(rootGetters)).queryVotes(key.proposal_id)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryVotes(key.proposal_id, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Votes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryVotes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getVotes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryVotes', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryParams(key.params_type, query)).data : (await (await initQueryClient(rootGetters)).queryParams(key.params_type)).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDeposit({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDeposit(key.proposal_id, key.depositor, query)).data : (await (await initQueryClient(rootGetters)).queryDeposit(key.proposal_id, key.depositor)).data; - commit('QUERY', { query: 'Deposit', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDeposit', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDeposit']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDeposit', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDeposits({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDeposits(key.proposal_id, query)).data : (await (await initQueryClient(rootGetters)).queryDeposits(key.proposal_id)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryDeposits(key.proposal_id, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Deposits', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDeposits', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDeposits']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDeposits', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryTallyResult({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryTallyResult(key.proposal_id, query)).data : (await (await initQueryClient(rootGetters)).queryTallyResult(key.proposal_id)).data; - commit('QUERY', { query: 'TallyResult', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryTallyResult', payload: { options: { all }, params: { ...key }, query } }); - return getters['getTallyResult']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryTallyResult', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgSubmitProposal({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitProposal(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitProposal:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitProposal:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgDeposit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDeposit(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgDeposit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDeposit:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgVote({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVote(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVote:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgSubmitProposal({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitProposal(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitProposal:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitProposal:Create', 'Could not create message.'); - } - } - }, - async MsgDeposit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDeposit(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgDeposit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDeposit:Create', 'Could not create message.'); - } - } - }, - async MsgVote({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVote(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVote:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts deleted file mode 100644 index c9861ef..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts +++ /dev/null @@ -1,377 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { TextProposal } from "./module/types/cosmos/gov/v1beta1/gov" -import { Deposit } from "./module/types/cosmos/gov/v1beta1/gov" -import { Proposal } from "./module/types/cosmos/gov/v1beta1/gov" -import { TallyResult } from "./module/types/cosmos/gov/v1beta1/gov" -import { Vote } from "./module/types/cosmos/gov/v1beta1/gov" -import { DepositParams } from "./module/types/cosmos/gov/v1beta1/gov" -import { VotingParams } from "./module/types/cosmos/gov/v1beta1/gov" -import { TallyParams } from "./module/types/cosmos/gov/v1beta1/gov" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Proposal: {}, - Proposals: {}, - Vote: {}, - Votes: {}, - Params: {}, - Deposit: {}, - Deposits: {}, - TallyResult: {}, - - _Structure: { - TextProposal: getStructure(TextProposal.fromPartial({})), - Deposit: getStructure(Deposit.fromPartial({})), - Proposal: getStructure(Proposal.fromPartial({})), - TallyResult: getStructure(TallyResult.fromPartial({})), - Vote: getStructure(Vote.fromPartial({})), - DepositParams: getStructure(DepositParams.fromPartial({})), - VotingParams: getStructure(VotingParams.fromPartial({})), - TallyParams: getStructure(TallyParams.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getProposal: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Proposal[JSON.stringify(params)] ?? {} - }, - getProposals: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Proposals[JSON.stringify(params)] ?? {} - }, - getVote: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Vote[JSON.stringify(params)] ?? {} - }, - getVotes: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Votes[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDeposit: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Deposit[JSON.stringify(params)] ?? {} - }, - getDeposits: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Deposits[JSON.stringify(params)] ?? {} - }, - getTallyResult: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.TallyResult[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryProposal({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryProposal( key.proposal_id, query)).data:(await (await initQueryClient(rootGetters)).queryProposal( key.proposal_id )).data - - commit('QUERY', { query: 'Proposal', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryProposal', payload: { options: { all }, params: {...key},query }}) - return getters['getProposal']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryProposal', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryProposals({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryProposals( query)).data:(await (await initQueryClient(rootGetters)).queryProposals()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryProposals({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Proposals', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryProposals', payload: { options: { all }, params: {...key},query }}) - return getters['getProposals']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryProposals', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryVote({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryVote( key.proposal_id, key.voter, query)).data:(await (await initQueryClient(rootGetters)).queryVote( key.proposal_id , key.voter )).data - - commit('QUERY', { query: 'Vote', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryVote', payload: { options: { all }, params: {...key},query }}) - return getters['getVote']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryVote', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryVotes({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryVotes( key.proposal_id, query)).data:(await (await initQueryClient(rootGetters)).queryVotes( key.proposal_id )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryVotes( key.proposal_id, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Votes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryVotes', payload: { options: { all }, params: {...key},query }}) - return getters['getVotes']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryVotes', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryParams( key.params_type, query)).data:(await (await initQueryClient(rootGetters)).queryParams( key.params_type )).data - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDeposit({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDeposit( key.proposal_id, key.depositor, query)).data:(await (await initQueryClient(rootGetters)).queryDeposit( key.proposal_id , key.depositor )).data - - commit('QUERY', { query: 'Deposit', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDeposit', payload: { options: { all }, params: {...key},query }}) - return getters['getDeposit']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDeposit', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDeposits({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDeposits( key.proposal_id, query)).data:(await (await initQueryClient(rootGetters)).queryDeposits( key.proposal_id )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryDeposits( key.proposal_id, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Deposits', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDeposits', payload: { options: { all }, params: {...key},query }}) - return getters['getDeposits']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDeposits', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryTallyResult({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryTallyResult( key.proposal_id, query)).data:(await (await initQueryClient(rootGetters)).queryTallyResult( key.proposal_id )).data - - commit('QUERY', { query: 'TallyResult', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryTallyResult', payload: { options: { all }, params: {...key},query }}) - return getters['getTallyResult']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryTallyResult', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgSubmitProposal({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitProposal(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitProposal:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSubmitProposal:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgDeposit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDeposit(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgDeposit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgDeposit:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgVote({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVote(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgVote:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgVote:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgSubmitProposal({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitProposal(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitProposal:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSubmitProposal:Create', 'Could not create message.') - } - } - }, - async MsgDeposit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDeposit(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgDeposit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgDeposit:Create', 'Could not create message.') - } - } - }, - async MsgVote({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgVote(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgVote:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgVote:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts deleted file mode 100644 index 8362a7a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgSubmitProposal: (data: MsgSubmitProposal) => EncodeObject; - msgDeposit: (data: MsgDeposit) => EncodeObject; - msgVote: (data: MsgVote) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js deleted file mode 100644 index 89faa3a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js +++ /dev/null @@ -1,33 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; -const types = [ - ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], - ["/cosmos.gov.v1beta1.MsgVote", MsgVote], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgSubmitProposal: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: data }), - msgDeposit: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: data }), - msgVote: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts deleted file mode 100644 index 8d5ad03..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; - - -const types = [ - ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], - ["/cosmos.gov.v1beta1.MsgVote", MsgVote], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgSubmitProposal: (data: MsgSubmitProposal): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: data }), - msgDeposit: (data: MsgDeposit): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: data }), - msgVote: (data: MsgVote): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts deleted file mode 100644 index b3bb3cd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,648 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* Deposit defines an amount deposited by an account address to an active -proposal. -*/ -export interface V1Beta1Deposit { - /** @format uint64 */ - proposalId?: string; - depositor?: string; - amount?: V1Beta1Coin[]; -} -/** - * DepositParams defines the params for deposits on governance proposals. - */ -export interface V1Beta1DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit?: V1Beta1Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod?: string; -} -/** - * MsgDepositResponse defines the Msg/Deposit response type. - */ -export declare type V1Beta1MsgDepositResponse = object; -/** - * MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. - */ -export interface V1Beta1MsgSubmitProposalResponse { - /** @format uint64 */ - proposalId?: string; -} -/** - * MsgVoteResponse defines the Msg/Vote response type. - */ -export declare type V1Beta1MsgVoteResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Proposal defines the core field members of a governance proposal. - */ -export interface V1Beta1Proposal { - /** @format uint64 */ - proposalId?: string; - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - content?: ProtobufAny; - /** - * ProposalStatus enumerates the valid statuses of a proposal. - * - * - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - * - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - * - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - * - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - * - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - * - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - status?: V1Beta1ProposalStatus; - /** TallyResult defines a standard tally for a governance proposal. */ - finalTallyResult?: V1Beta1TallyResult; - /** @format date-time */ - submitTime?: string; - /** @format date-time */ - depositEndTime?: string; - totalDeposit?: V1Beta1Coin[]; - /** @format date-time */ - votingStartTime?: string; - /** @format date-time */ - votingEndTime?: string; -} -/** -* ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit -period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting -period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has -passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has -been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has -failed. -*/ -export declare enum V1Beta1ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = "PROPOSAL_STATUS_UNSPECIFIED", - PROPOSAL_STATUS_DEPOSIT_PERIOD = "PROPOSAL_STATUS_DEPOSIT_PERIOD", - PROPOSAL_STATUS_VOTING_PERIOD = "PROPOSAL_STATUS_VOTING_PERIOD", - PROPOSAL_STATUS_PASSED = "PROPOSAL_STATUS_PASSED", - PROPOSAL_STATUS_REJECTED = "PROPOSAL_STATUS_REJECTED", - PROPOSAL_STATUS_FAILED = "PROPOSAL_STATUS_FAILED" -} -/** - * QueryDepositResponse is the response type for the Query/Deposit RPC method. - */ -export interface V1Beta1QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit?: V1Beta1Deposit; -} -/** - * QueryDepositsResponse is the response type for the Query/Deposits RPC method. - */ -export interface V1Beta1QueryDepositsResponse { - deposits?: V1Beta1Deposit[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams?: V1Beta1VotingParams; - /** deposit_params defines the parameters related to deposit. */ - depositParams?: V1Beta1DepositParams; - /** tally_params defines the parameters related to tally. */ - tallyParams?: V1Beta1TallyParams; -} -/** - * QueryProposalResponse is the response type for the Query/Proposal RPC method. - */ -export interface V1Beta1QueryProposalResponse { - /** Proposal defines the core field members of a governance proposal. */ - proposal?: V1Beta1Proposal; -} -/** -* QueryProposalsResponse is the response type for the Query/Proposals RPC -method. -*/ -export interface V1Beta1QueryProposalsResponse { - proposals?: V1Beta1Proposal[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryTallyResultResponse is the response type for the Query/Tally RPC method. - */ -export interface V1Beta1QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally?: V1Beta1TallyResult; -} -/** - * QueryVoteResponse is the response type for the Query/Vote RPC method. - */ -export interface V1Beta1QueryVoteResponse { - /** vote defined the queried vote. */ - vote?: V1Beta1Vote; -} -/** - * QueryVotesResponse is the response type for the Query/Votes RPC method. - */ -export interface V1Beta1QueryVotesResponse { - /** votes defined the queried votes. */ - votes?: V1Beta1Vote[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * TallyParams defines the params for tallying votes on governance proposals. - */ -export interface V1Beta1TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - * @format byte - */ - quorum?: string; - /** - * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - * @format byte - */ - threshold?: string; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - * @format byte - */ - vetoThreshold?: string; -} -/** - * TallyResult defines a standard tally for a governance proposal. - */ -export interface V1Beta1TallyResult { - yes?: string; - abstain?: string; - no?: string; - noWithVeto?: string; -} -/** -* Vote defines a vote on a governance proposal. -A Vote consists of a proposal ID, the voter, and the vote option. -*/ -export interface V1Beta1Vote { - /** @format uint64 */ - proposalId?: string; - voter?: string; - /** - * VoteOption enumerates the valid vote options for a given governance proposal. - * - * - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - * - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - * - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - * - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - * - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - */ - option?: V1Beta1VoteOption; -} -/** -* VoteOption enumerates the valid vote options for a given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. -*/ -export declare enum V1Beta1VoteOption { - 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" -} -/** - * VotingParams defines the params for voting on governance proposals. - */ -export interface V1Beta1VotingParams { - /** Length of the voting period. */ - votingPeriod?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/gov/v1beta1/gov.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{paramsType} - */ - queryParams: (paramsType: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryProposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - queryProposals: (query?: { - proposalStatus?: "PROPOSAL_STATUS_UNSPECIFIED" | "PROPOSAL_STATUS_DEPOSIT_PERIOD" | "PROPOSAL_STATUS_VOTING_PERIOD" | "PROPOSAL_STATUS_PASSED" | "PROPOSAL_STATUS_REJECTED" | "PROPOSAL_STATUS_FAILED"; - voter?: string; - depositor?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryProposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId} - */ - queryProposal: (proposalId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDeposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits - */ - queryDeposits: (proposalId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDeposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor} - */ - queryDeposit: (proposalId: string, depositor: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryTallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/tally - */ - queryTallyResult: (proposalId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryVotes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes - */ - queryVotes: (proposalId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryVote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter} - */ - queryVote: (proposalId: string, voter: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js deleted file mode 100644 index 1bea9eb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js +++ /dev/null @@ -1,296 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit -period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting -period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has -passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has -been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has -failed. -*/ -export var V1Beta1ProposalStatus; -(function (V1Beta1ProposalStatus) { - V1Beta1ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = "PROPOSAL_STATUS_UNSPECIFIED"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = "PROPOSAL_STATUS_VOTING_PERIOD"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_PASSED"] = "PROPOSAL_STATUS_PASSED"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_REJECTED"] = "PROPOSAL_STATUS_REJECTED"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_FAILED"] = "PROPOSAL_STATUS_FAILED"; -})(V1Beta1ProposalStatus || (V1Beta1ProposalStatus = {})); -/** -* VoteOption enumerates the valid vote options for a given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. -*/ -export var V1Beta1VoteOption; -(function (V1Beta1VoteOption) { - V1Beta1VoteOption["VOTE_OPTION_UNSPECIFIED"] = "VOTE_OPTION_UNSPECIFIED"; - V1Beta1VoteOption["VOTE_OPTION_YES"] = "VOTE_OPTION_YES"; - V1Beta1VoteOption["VOTE_OPTION_ABSTAIN"] = "VOTE_OPTION_ABSTAIN"; - V1Beta1VoteOption["VOTE_OPTION_NO"] = "VOTE_OPTION_NO"; - V1Beta1VoteOption["VOTE_OPTION_NO_WITH_VETO"] = "VOTE_OPTION_NO_WITH_VETO"; -})(V1Beta1VoteOption || (V1Beta1VoteOption = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/gov/v1beta1/gov.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{paramsType} - */ - this.queryParams = (paramsType, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/params/${paramsType}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryProposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - this.queryProposals = (query, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryProposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId} - */ - this.queryProposal = (proposalId, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDeposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits - */ - this.queryDeposits = (proposalId, query, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDeposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor} - */ - this.queryDeposit = (proposalId, depositor, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryTallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/tally - */ - this.queryTallyResult = (proposalId, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryVotes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes - */ - this.queryVotes = (proposalId, query, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryVote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter} - */ - this.queryVote = (proposalId, voter, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts deleted file mode 100644 index b5c0ae7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts +++ /dev/null @@ -1,917 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* Deposit defines an amount deposited by an account address to an active -proposal. -*/ -export interface V1Beta1Deposit { - /** @format uint64 */ - proposalId?: string; - depositor?: string; - amount?: V1Beta1Coin[]; -} - -/** - * DepositParams defines the params for deposits on governance proposals. - */ -export interface V1Beta1DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit?: V1Beta1Coin[]; - - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod?: string; -} - -/** - * MsgDepositResponse defines the Msg/Deposit response type. - */ -export type V1Beta1MsgDepositResponse = object; - -/** - * MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. - */ -export interface V1Beta1MsgSubmitProposalResponse { - /** @format uint64 */ - proposalId?: string; -} - -/** - * MsgVoteResponse defines the Msg/Vote response type. - */ -export type V1Beta1MsgVoteResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Proposal defines the core field members of a governance proposal. - */ -export interface V1Beta1Proposal { - /** @format uint64 */ - proposalId?: string; - - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - content?: ProtobufAny; - - /** - * ProposalStatus enumerates the valid statuses of a proposal. - * - * - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - * - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - * - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - * - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - * - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - * - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - status?: V1Beta1ProposalStatus; - - /** TallyResult defines a standard tally for a governance proposal. */ - finalTallyResult?: V1Beta1TallyResult; - - /** @format date-time */ - submitTime?: string; - - /** @format date-time */ - depositEndTime?: string; - totalDeposit?: V1Beta1Coin[]; - - /** @format date-time */ - votingStartTime?: string; - - /** @format date-time */ - votingEndTime?: string; -} - -/** -* ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit -period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting -period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has -passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has -been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has -failed. -*/ -export enum V1Beta1ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = "PROPOSAL_STATUS_UNSPECIFIED", - PROPOSAL_STATUS_DEPOSIT_PERIOD = "PROPOSAL_STATUS_DEPOSIT_PERIOD", - PROPOSAL_STATUS_VOTING_PERIOD = "PROPOSAL_STATUS_VOTING_PERIOD", - PROPOSAL_STATUS_PASSED = "PROPOSAL_STATUS_PASSED", - PROPOSAL_STATUS_REJECTED = "PROPOSAL_STATUS_REJECTED", - PROPOSAL_STATUS_FAILED = "PROPOSAL_STATUS_FAILED", -} - -/** - * QueryDepositResponse is the response type for the Query/Deposit RPC method. - */ -export interface V1Beta1QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit?: V1Beta1Deposit; -} - -/** - * QueryDepositsResponse is the response type for the Query/Deposits RPC method. - */ -export interface V1Beta1QueryDepositsResponse { - deposits?: V1Beta1Deposit[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams?: V1Beta1VotingParams; - - /** deposit_params defines the parameters related to deposit. */ - depositParams?: V1Beta1DepositParams; - - /** tally_params defines the parameters related to tally. */ - tallyParams?: V1Beta1TallyParams; -} - -/** - * QueryProposalResponse is the response type for the Query/Proposal RPC method. - */ -export interface V1Beta1QueryProposalResponse { - /** Proposal defines the core field members of a governance proposal. */ - proposal?: V1Beta1Proposal; -} - -/** -* QueryProposalsResponse is the response type for the Query/Proposals RPC -method. -*/ -export interface V1Beta1QueryProposalsResponse { - proposals?: V1Beta1Proposal[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryTallyResultResponse is the response type for the Query/Tally RPC method. - */ -export interface V1Beta1QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally?: V1Beta1TallyResult; -} - -/** - * QueryVoteResponse is the response type for the Query/Vote RPC method. - */ -export interface V1Beta1QueryVoteResponse { - /** vote defined the queried vote. */ - vote?: V1Beta1Vote; -} - -/** - * QueryVotesResponse is the response type for the Query/Votes RPC method. - */ -export interface V1Beta1QueryVotesResponse { - /** votes defined the queried votes. */ - votes?: V1Beta1Vote[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * TallyParams defines the params for tallying votes on governance proposals. - */ -export interface V1Beta1TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - * @format byte - */ - quorum?: string; - - /** - * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - * @format byte - */ - threshold?: string; - - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - * @format byte - */ - vetoThreshold?: string; -} - -/** - * TallyResult defines a standard tally for a governance proposal. - */ -export interface V1Beta1TallyResult { - yes?: string; - abstain?: string; - no?: string; - noWithVeto?: string; -} - -/** -* Vote defines a vote on a governance proposal. -A Vote consists of a proposal ID, the voter, and the vote option. -*/ -export interface V1Beta1Vote { - /** @format uint64 */ - proposalId?: string; - voter?: string; - - /** - * VoteOption enumerates the valid vote options for a given governance proposal. - * - * - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - * - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - * - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - * - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - * - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - */ - option?: V1Beta1VoteOption; -} - -/** -* VoteOption enumerates the valid vote options for a given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. -*/ -export enum V1Beta1VoteOption { - 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", -} - -/** - * VotingParams defines the params for voting on governance proposals. - */ -export interface V1Beta1VotingParams { - /** Length of the voting period. */ - votingPeriod?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/gov/v1beta1/gov.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{paramsType} - */ - queryParams = (paramsType: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/params/${paramsType}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryProposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - queryProposals = ( - query?: { - proposalStatus?: - | "PROPOSAL_STATUS_UNSPECIFIED" - | "PROPOSAL_STATUS_DEPOSIT_PERIOD" - | "PROPOSAL_STATUS_VOTING_PERIOD" - | "PROPOSAL_STATUS_PASSED" - | "PROPOSAL_STATUS_REJECTED" - | "PROPOSAL_STATUS_FAILED"; - voter?: string; - depositor?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryProposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId} - */ - queryProposal = (proposalId: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDeposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits - */ - queryDeposits = ( - proposalId: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDeposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor} - */ - queryDeposit = (proposalId: string, depositor: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryTallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/tally - */ - queryTallyResult = (proposalId: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryVotes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes - */ - queryVotes = ( - proposalId: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryVote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter} - */ - queryVote = (proposalId: string, voter: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts deleted file mode 100644 index 9822eb2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "../../../cosmos/gov/v1beta1/gov"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisState { - /** starting_proposal_id is the ID of the starting proposal. */ - startingProposalId: number; - /** deposits defines all the deposits present at genesis. */ - deposits: Deposit[]; - /** votes defines all the votes present at genesis. */ - votes: Vote[]; - /** proposals defines all the proposals present at genesis. */ - proposals: Proposal[]; - /** params defines all the paramaters of related to deposit. */ - depositParams: DepositParams | undefined; - /** params defines all the paramaters of related to voting. */ - votingParams: VotingParams | undefined; - /** params defines all the paramaters of related to tally. */ - tallyParams: TallyParams | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js deleted file mode 100644 index 23741d2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js +++ /dev/null @@ -1,221 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams, } from "../../../cosmos/gov/v1beta1/gov"; -export const protobufPackage = "cosmos.gov.v1beta1"; -const baseGenesisState = { startingProposalId: 0 }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.startingProposalId !== 0) { - writer.uint32(8).uint64(message.startingProposalId); - } - for (const v of message.deposits) { - Deposit.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.proposals) { - Proposal.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(42).fork()).ldelim(); - } - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(50).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.deposits = []; - message.votes = []; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startingProposalId = longToNumber(reader.uint64()); - break; - case 2: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 3: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 4: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 5: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 6: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 7: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.deposits = []; - message.votes = []; - message.proposals = []; - if (object.startingProposalId !== undefined && - object.startingProposalId !== null) { - message.startingProposalId = Number(object.startingProposalId); - } - else { - message.startingProposalId = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromJSON(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromJSON(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromJSON(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.startingProposalId !== undefined && - (obj.startingProposalId = message.startingProposalId); - if (message.deposits) { - obj.deposits = message.deposits.map((e) => e ? Deposit.toJSON(e) : undefined); - } - else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } - else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map((e) => e ? Proposal.toJSON(e) : undefined); - } - else { - obj.proposals = []; - } - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); - message.votingParams !== undefined && - (obj.votingParams = message.votingParams - ? VotingParams.toJSON(message.votingParams) - : undefined); - message.tallyParams !== undefined && - (obj.tallyParams = message.tallyParams - ? TallyParams.toJSON(message.tallyParams) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.deposits = []; - message.votes = []; - message.proposals = []; - if (object.startingProposalId !== undefined && - object.startingProposalId !== null) { - message.startingProposalId = object.startingProposalId; - } - else { - message.startingProposalId = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromPartial(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromPartial(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromPartial(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts deleted file mode 100644 index 9d0bdd9..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts +++ /dev/null @@ -1,271 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Deposit, - Vote, - Proposal, - DepositParams, - VotingParams, - TallyParams, -} from "../../../cosmos/gov/v1beta1/gov"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisState { - /** starting_proposal_id is the ID of the starting proposal. */ - startingProposalId: number; - /** deposits defines all the deposits present at genesis. */ - deposits: Deposit[]; - /** votes defines all the votes present at genesis. */ - votes: Vote[]; - /** proposals defines all the proposals present at genesis. */ - proposals: Proposal[]; - /** params defines all the paramaters of related to deposit. */ - depositParams: DepositParams | undefined; - /** params defines all the paramaters of related to voting. */ - votingParams: VotingParams | undefined; - /** params defines all the paramaters of related to tally. */ - tallyParams: TallyParams | undefined; -} - -const baseGenesisState: object = { startingProposalId: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.startingProposalId !== 0) { - writer.uint32(8).uint64(message.startingProposalId); - } - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode( - message.depositParams, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.votingParams !== undefined) { - VotingParams.encode( - message.votingParams, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode( - message.tallyParams, - writer.uint32(58).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.deposits = []; - message.votes = []; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startingProposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 3: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 4: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 5: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 6: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 7: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.deposits = []; - message.votes = []; - message.proposals = []; - if ( - object.startingProposalId !== undefined && - object.startingProposalId !== null - ) { - message.startingProposalId = Number(object.startingProposalId); - } else { - message.startingProposalId = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromJSON(object.depositParams); - } else { - message.depositParams = undefined; - } - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromJSON(object.votingParams); - } else { - message.votingParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromJSON(object.tallyParams); - } else { - message.tallyParams = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.startingProposalId !== undefined && - (obj.startingProposalId = message.startingProposalId); - if (message.deposits) { - obj.deposits = message.deposits.map((e) => - e ? Deposit.toJSON(e) : undefined - ); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map((e) => - e ? Proposal.toJSON(e) : undefined - ); - } else { - obj.proposals = []; - } - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); - message.votingParams !== undefined && - (obj.votingParams = message.votingParams - ? VotingParams.toJSON(message.votingParams) - : undefined); - message.tallyParams !== undefined && - (obj.tallyParams = message.tallyParams - ? TallyParams.toJSON(message.tallyParams) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.deposits = []; - message.votes = []; - message.proposals = []; - if ( - object.startingProposalId !== undefined && - object.startingProposalId !== null - ) { - message.startingProposalId = object.startingProposalId; - } else { - message.startingProposalId = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromPartial(object.depositParams); - } else { - message.depositParams = undefined; - } - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromPartial(object.votingParams); - } else { - message.votingParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromPartial(object.tallyParams); - } else { - message.tallyParams = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts deleted file mode 100644 index 4526dfe..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export declare enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - 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 declare function voteOptionFromJSON(object: any): VoteOption; -export declare function voteOptionToJSON(object: VoteOption): string; -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export declare enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - PROPOSAL_STATUS_VOTING_PERIOD = 2, - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - PROPOSAL_STATUS_PASSED = 3, - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - PROPOSAL_STATUS_REJECTED = 4, - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - PROPOSAL_STATUS_FAILED = 5, - UNRECOGNIZED = -1 -} -export declare function proposalStatusFromJSON(object: any): ProposalStatus; -export declare function proposalStatusToJSON(object: ProposalStatus): string; -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposal { - title: string; - description: string; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface Deposit { - proposalId: number; - depositor: string; - amount: Coin[]; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface Proposal { - proposalId: number; - content: Any | undefined; - status: ProposalStatus; - finalTallyResult: TallyResult | undefined; - submitTime: Date | undefined; - depositEndTime: Date | undefined; - totalDeposit: Coin[]; - votingStartTime: Date | undefined; - votingEndTime: Date | undefined; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResult { - yes: string; - abstain: string; - no: string; - noWithVeto: string; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface Vote { - proposalId: number; - voter: string; - option: VoteOption; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit: Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod: Duration | undefined; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParams { - /** Length of the voting period. */ - votingPeriod: Duration | undefined; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: Uint8Array; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: Uint8Array; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - vetoThreshold: Uint8Array; -} -export declare const TextProposal: { - encode(message: TextProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TextProposal; - fromJSON(object: any): TextProposal; - toJSON(message: TextProposal): unknown; - fromPartial(object: DeepPartial): TextProposal; -}; -export declare const Deposit: { - encode(message: Deposit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Deposit; - fromJSON(object: any): Deposit; - toJSON(message: Deposit): unknown; - fromPartial(object: DeepPartial): Deposit; -}; -export declare const Proposal: { - encode(message: Proposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proposal; - fromJSON(object: any): Proposal; - toJSON(message: Proposal): unknown; - fromPartial(object: DeepPartial): Proposal; -}; -export declare const TallyResult: { - encode(message: TallyResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TallyResult; - fromJSON(object: any): TallyResult; - toJSON(message: TallyResult): unknown; - fromPartial(object: DeepPartial): TallyResult; -}; -export declare const Vote: { - encode(message: Vote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Vote; - fromJSON(object: any): Vote; - toJSON(message: Vote): unknown; - fromPartial(object: DeepPartial): Vote; -}; -export declare const DepositParams: { - encode(message: DepositParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DepositParams; - fromJSON(object: any): DepositParams; - toJSON(message: DepositParams): unknown; - fromPartial(object: DeepPartial): DepositParams; -}; -export declare const VotingParams: { - encode(message: VotingParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VotingParams; - fromJSON(object: any): VotingParams; - toJSON(message: VotingParams): unknown; - fromPartial(object: DeepPartial): VotingParams; -}; -export declare const TallyParams: { - encode(message: TallyParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TallyParams; - fromJSON(object: any): TallyParams; - toJSON(message: TallyParams): unknown; - fromPartial(object: DeepPartial): TallyParams; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js deleted file mode 100644 index 7976043..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js +++ /dev/null @@ -1,1022 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -export const protobufPackage = "cosmos.gov.v1beta1"; -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export var VoteOption; -(function (VoteOption) { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VoteOption[VoteOption["VOTE_OPTION_UNSPECIFIED"] = 0] = "VOTE_OPTION_UNSPECIFIED"; - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VoteOption[VoteOption["VOTE_OPTION_YES"] = 1] = "VOTE_OPTION_YES"; - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VoteOption[VoteOption["VOTE_OPTION_ABSTAIN"] = 2] = "VOTE_OPTION_ABSTAIN"; - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VoteOption[VoteOption["VOTE_OPTION_NO"] = 3] = "VOTE_OPTION_NO"; - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VoteOption[VoteOption["VOTE_OPTION_NO_WITH_VETO"] = 4] = "VOTE_OPTION_NO_WITH_VETO"; - VoteOption[VoteOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(VoteOption || (VoteOption = {})); -export function voteOptionFromJSON(object) { - 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) { - 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"; - default: - return "UNKNOWN"; - } -} -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export var ProposalStatus; -(function (ProposalStatus) { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = 0] = "PROPOSAL_STATUS_UNSPECIFIED"; - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = 2] = "PROPOSAL_STATUS_VOTING_PERIOD"; - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_PASSED"] = 3] = "PROPOSAL_STATUS_PASSED"; - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_REJECTED"] = 4] = "PROPOSAL_STATUS_REJECTED"; - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_FAILED"] = 5] = "PROPOSAL_STATUS_FAILED"; - ProposalStatus[ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ProposalStatus || (ProposalStatus = {})); -export function proposalStatusFromJSON(object) { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} -export function proposalStatusToJSON(object) { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - default: - return "UNKNOWN"; - } -} -const baseTextProposal = { title: "", description: "" }; -export const TextProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTextProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTextProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - fromPartial(object) { - const message = { ...baseTextProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - return message; - }, -}; -const baseDeposit = { proposalId: 0, depositor: "" }; -export const Deposit = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDeposit }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseProposal = { proposalId: 0, status: 0 }; -export const Proposal = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(18).fork()).ldelim(); - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status); - } - if (message.finalTallyResult !== undefined) { - TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim(); - } - if (message.submitTime !== undefined) { - Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim(); - } - if (message.depositEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim(); - } - for (const v of message.totalDeposit) { - Coin.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.votingStartTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim(); - } - if (message.votingEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal }; - message.totalDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.content = Any.decode(reader, reader.uint32()); - break; - case 3: - message.status = reader.int32(); - break; - case 4: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProposal }; - message.totalDeposit = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } - else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = proposalStatusFromJSON(object.status); - } - else { - message.status = 0; - } - if (object.finalTallyResult !== undefined && - object.finalTallyResult !== null) { - message.finalTallyResult = TallyResult.fromJSON(object.finalTallyResult); - } - else { - message.finalTallyResult = undefined; - } - if (object.submitTime !== undefined && object.submitTime !== null) { - message.submitTime = fromJsonTimestamp(object.submitTime); - } - else { - message.submitTime = undefined; - } - if (object.depositEndTime !== undefined && object.depositEndTime !== null) { - message.depositEndTime = fromJsonTimestamp(object.depositEndTime); - } - else { - message.depositEndTime = undefined; - } - if (object.totalDeposit !== undefined && object.totalDeposit !== null) { - for (const e of object.totalDeposit) { - message.totalDeposit.push(Coin.fromJSON(e)); - } - } - if (object.votingStartTime !== undefined && - object.votingStartTime !== null) { - message.votingStartTime = fromJsonTimestamp(object.votingStartTime); - } - else { - message.votingStartTime = undefined; - } - if (object.votingEndTime !== undefined && object.votingEndTime !== null) { - message.votingEndTime = fromJsonTimestamp(object.votingEndTime); - } - else { - message.votingEndTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - message.status !== undefined && - (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && - (obj.finalTallyResult = message.finalTallyResult - ? TallyResult.toJSON(message.finalTallyResult) - : undefined); - message.submitTime !== undefined && - (obj.submitTime = - message.submitTime !== undefined - ? message.submitTime.toISOString() - : null); - message.depositEndTime !== undefined && - (obj.depositEndTime = - message.depositEndTime !== undefined - ? message.depositEndTime.toISOString() - : null); - if (message.totalDeposit) { - obj.totalDeposit = message.totalDeposit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.totalDeposit = []; - } - message.votingStartTime !== undefined && - (obj.votingStartTime = - message.votingStartTime !== undefined - ? message.votingStartTime.toISOString() - : null); - message.votingEndTime !== undefined && - (obj.votingEndTime = - message.votingEndTime !== undefined - ? message.votingEndTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseProposal }; - message.totalDeposit = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } - else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = 0; - } - if (object.finalTallyResult !== undefined && - object.finalTallyResult !== null) { - message.finalTallyResult = TallyResult.fromPartial(object.finalTallyResult); - } - else { - message.finalTallyResult = undefined; - } - if (object.submitTime !== undefined && object.submitTime !== null) { - message.submitTime = object.submitTime; - } - else { - message.submitTime = undefined; - } - if (object.depositEndTime !== undefined && object.depositEndTime !== null) { - message.depositEndTime = object.depositEndTime; - } - else { - message.depositEndTime = undefined; - } - if (object.totalDeposit !== undefined && object.totalDeposit !== null) { - for (const e of object.totalDeposit) { - message.totalDeposit.push(Coin.fromPartial(e)); - } - } - if (object.votingStartTime !== undefined && - object.votingStartTime !== null) { - message.votingStartTime = object.votingStartTime; - } - else { - message.votingStartTime = undefined; - } - if (object.votingEndTime !== undefined && object.votingEndTime !== null) { - message.votingEndTime = object.votingEndTime; - } - else { - message.votingEndTime = undefined; - } - return message; - }, -}; -const baseTallyResult = { - yes: "", - abstain: "", - no: "", - noWithVeto: "", -}; -export const TallyResult = { - encode(message, writer = Writer.create()) { - if (message.yes !== "") { - writer.uint32(10).string(message.yes); - } - if (message.abstain !== "") { - writer.uint32(18).string(message.abstain); - } - if (message.no !== "") { - writer.uint32(26).string(message.no); - } - if (message.noWithVeto !== "") { - writer.uint32(34).string(message.noWithVeto); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyResult }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes = reader.string(); - break; - case 2: - message.abstain = reader.string(); - break; - case 3: - message.no = reader.string(); - break; - case 4: - message.noWithVeto = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTallyResult }; - if (object.yes !== undefined && object.yes !== null) { - message.yes = String(object.yes); - } - else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = String(object.abstain); - } - else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = String(object.no); - } - else { - message.no = ""; - } - if (object.noWithVeto !== undefined && object.noWithVeto !== null) { - message.noWithVeto = String(object.noWithVeto); - } - else { - message.noWithVeto = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.yes !== undefined && (obj.yes = message.yes); - message.abstain !== undefined && (obj.abstain = message.abstain); - message.no !== undefined && (obj.no = message.no); - message.noWithVeto !== undefined && (obj.noWithVeto = message.noWithVeto); - return obj; - }, - fromPartial(object) { - const message = { ...baseTallyResult }; - if (object.yes !== undefined && object.yes !== null) { - message.yes = object.yes; - } - else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = object.abstain; - } - else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = object.no; - } - else { - message.no = ""; - } - if (object.noWithVeto !== undefined && object.noWithVeto !== null) { - message.noWithVeto = object.noWithVeto; - } - else { - message.noWithVeto = ""; - } - return message; - }, -}; -const baseVote = { proposalId: 0, voter: "", option: 0 }; -export const Vote = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVote }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } - else { - message.option = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - fromPartial(object) { - const message = { ...baseVote }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } - else { - message.option = 0; - } - return message; - }, -}; -const baseDepositParams = {}; -export const DepositParams = { - encode(message, writer = Writer.create()) { - for (const v of message.minDeposit) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.maxDepositPeriod !== undefined) { - Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDepositParams }; - message.minDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDepositParams }; - message.minDeposit = []; - if (object.minDeposit !== undefined && object.minDeposit !== null) { - for (const e of object.minDeposit) { - message.minDeposit.push(Coin.fromJSON(e)); - } - } - if (object.maxDepositPeriod !== undefined && - object.maxDepositPeriod !== null) { - message.maxDepositPeriod = Duration.fromJSON(object.maxDepositPeriod); - } - else { - message.maxDepositPeriod = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.minDeposit) { - obj.minDeposit = message.minDeposit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.minDeposit = []; - } - message.maxDepositPeriod !== undefined && - (obj.maxDepositPeriod = message.maxDepositPeriod - ? Duration.toJSON(message.maxDepositPeriod) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseDepositParams }; - message.minDeposit = []; - if (object.minDeposit !== undefined && object.minDeposit !== null) { - for (const e of object.minDeposit) { - message.minDeposit.push(Coin.fromPartial(e)); - } - } - if (object.maxDepositPeriod !== undefined && - object.maxDepositPeriod !== null) { - message.maxDepositPeriod = Duration.fromPartial(object.maxDepositPeriod); - } - else { - message.maxDepositPeriod = undefined; - } - return message; - }, -}; -const baseVotingParams = {}; -export const VotingParams = { - encode(message, writer = Writer.create()) { - if (message.votingPeriod !== undefined) { - Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVotingParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVotingParams }; - if (object.votingPeriod !== undefined && object.votingPeriod !== null) { - message.votingPeriod = Duration.fromJSON(object.votingPeriod); - } - else { - message.votingPeriod = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.votingPeriod !== undefined && - (obj.votingPeriod = message.votingPeriod - ? Duration.toJSON(message.votingPeriod) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseVotingParams }; - if (object.votingPeriod !== undefined && object.votingPeriod !== null) { - message.votingPeriod = Duration.fromPartial(object.votingPeriod); - } - else { - message.votingPeriod = undefined; - } - return message; - }, -}; -const baseTallyParams = {}; -export const TallyParams = { - encode(message, writer = Writer.create()) { - if (message.quorum.length !== 0) { - writer.uint32(10).bytes(message.quorum); - } - if (message.threshold.length !== 0) { - writer.uint32(18).bytes(message.threshold); - } - if (message.vetoThreshold.length !== 0) { - writer.uint32(26).bytes(message.vetoThreshold); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.vetoThreshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTallyParams }; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = bytesFromBase64(object.quorum); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = bytesFromBase64(object.threshold); - } - if (object.vetoThreshold !== undefined && object.vetoThreshold !== null) { - message.vetoThreshold = bytesFromBase64(object.vetoThreshold); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.quorum !== undefined && - (obj.quorum = base64FromBytes(message.quorum !== undefined ? message.quorum : new Uint8Array())); - message.threshold !== undefined && - (obj.threshold = base64FromBytes(message.threshold !== undefined ? message.threshold : new Uint8Array())); - message.vetoThreshold !== undefined && - (obj.vetoThreshold = base64FromBytes(message.vetoThreshold !== undefined - ? message.vetoThreshold - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseTallyParams }; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = object.quorum; - } - else { - message.quorum = new Uint8Array(); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = object.threshold; - } - else { - message.threshold = new Uint8Array(); - } - if (object.vetoThreshold !== undefined && object.vetoThreshold !== null) { - message.vetoThreshold = object.vetoThreshold; - } - else { - message.vetoThreshold = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts deleted file mode 100644 index c2e0072..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts +++ /dev/null @@ -1,1180 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - 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"; - default: - return "UNKNOWN"; - } -} - -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - PROPOSAL_STATUS_VOTING_PERIOD = 2, - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - PROPOSAL_STATUS_PASSED = 3, - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - PROPOSAL_STATUS_REJECTED = 4, - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - PROPOSAL_STATUS_FAILED = 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_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - 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_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - default: - return "UNKNOWN"; - } -} - -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposal { - title: string; - description: string; -} - -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface Deposit { - proposalId: number; - depositor: string; - amount: Coin[]; -} - -/** Proposal defines the core field members of a governance proposal. */ -export interface Proposal { - proposalId: number; - content: Any | undefined; - status: ProposalStatus; - finalTallyResult: TallyResult | undefined; - submitTime: Date | undefined; - depositEndTime: Date | undefined; - totalDeposit: Coin[]; - votingStartTime: Date | undefined; - votingEndTime: Date | undefined; -} - -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResult { - yes: string; - abstain: string; - no: string; - noWithVeto: string; -} - -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface Vote { - proposalId: number; - voter: string; - option: VoteOption; -} - -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit: Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod: Duration | undefined; -} - -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParams { - /** Length of the voting period. */ - votingPeriod: Duration | undefined; -} - -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: Uint8Array; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: Uint8Array; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - vetoThreshold: Uint8Array; -} - -const baseTextProposal: object = { title: "", description: "" }; - -export const TextProposal = { - encode(message: TextProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TextProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTextProposal } as TextProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TextProposal { - const message = { ...baseTextProposal } as TextProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: TextProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial(object: DeepPartial): TextProposal { - const message = { ...baseTextProposal } as TextProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -const baseDeposit: object = { proposalId: 0, depositor: "" }; - -export const Deposit = { - encode(message: Deposit, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Deposit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDeposit } as Deposit; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Deposit { - const message = { ...baseDeposit } as Deposit; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Deposit): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Deposit { - const message = { ...baseDeposit } as Deposit; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseProposal: object = { proposalId: 0, status: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(18).fork()).ldelim(); - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status); - } - if (message.finalTallyResult !== undefined) { - TallyResult.encode( - message.finalTallyResult, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.submitTime !== undefined) { - Timestamp.encode( - toTimestamp(message.submitTime), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.depositEndTime !== undefined) { - Timestamp.encode( - toTimestamp(message.depositEndTime), - writer.uint32(50).fork() - ).ldelim(); - } - for (const v of message.totalDeposit) { - Coin.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.votingStartTime !== undefined) { - Timestamp.encode( - toTimestamp(message.votingStartTime), - writer.uint32(66).fork() - ).ldelim(); - } - if (message.votingEndTime !== undefined) { - Timestamp.encode( - toTimestamp(message.votingEndTime), - writer.uint32(74).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - message.totalDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.content = Any.decode(reader, reader.uint32()); - break; - case 3: - message.status = reader.int32() as any; - break; - case 4: - message.finalTallyResult = TallyResult.decode( - reader, - reader.uint32() - ); - break; - case 5: - message.submitTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.depositEndTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 9: - message.votingEndTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - message.totalDeposit = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = proposalStatusFromJSON(object.status); - } else { - message.status = 0; - } - if ( - object.finalTallyResult !== undefined && - object.finalTallyResult !== null - ) { - message.finalTallyResult = TallyResult.fromJSON(object.finalTallyResult); - } else { - message.finalTallyResult = undefined; - } - if (object.submitTime !== undefined && object.submitTime !== null) { - message.submitTime = fromJsonTimestamp(object.submitTime); - } else { - message.submitTime = undefined; - } - if (object.depositEndTime !== undefined && object.depositEndTime !== null) { - message.depositEndTime = fromJsonTimestamp(object.depositEndTime); - } else { - message.depositEndTime = undefined; - } - if (object.totalDeposit !== undefined && object.totalDeposit !== null) { - for (const e of object.totalDeposit) { - message.totalDeposit.push(Coin.fromJSON(e)); - } - } - if ( - object.votingStartTime !== undefined && - object.votingStartTime !== null - ) { - message.votingStartTime = fromJsonTimestamp(object.votingStartTime); - } else { - message.votingStartTime = undefined; - } - if (object.votingEndTime !== undefined && object.votingEndTime !== null) { - message.votingEndTime = fromJsonTimestamp(object.votingEndTime); - } else { - message.votingEndTime = undefined; - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - message.status !== undefined && - (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && - (obj.finalTallyResult = message.finalTallyResult - ? TallyResult.toJSON(message.finalTallyResult) - : undefined); - message.submitTime !== undefined && - (obj.submitTime = - message.submitTime !== undefined - ? message.submitTime.toISOString() - : null); - message.depositEndTime !== undefined && - (obj.depositEndTime = - message.depositEndTime !== undefined - ? message.depositEndTime.toISOString() - : null); - if (message.totalDeposit) { - obj.totalDeposit = message.totalDeposit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.totalDeposit = []; - } - message.votingStartTime !== undefined && - (obj.votingStartTime = - message.votingStartTime !== undefined - ? message.votingStartTime.toISOString() - : null); - message.votingEndTime !== undefined && - (obj.votingEndTime = - message.votingEndTime !== undefined - ? message.votingEndTime.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - message.totalDeposit = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = 0; - } - if ( - object.finalTallyResult !== undefined && - object.finalTallyResult !== null - ) { - message.finalTallyResult = TallyResult.fromPartial( - object.finalTallyResult - ); - } else { - message.finalTallyResult = undefined; - } - if (object.submitTime !== undefined && object.submitTime !== null) { - message.submitTime = object.submitTime; - } else { - message.submitTime = undefined; - } - if (object.depositEndTime !== undefined && object.depositEndTime !== null) { - message.depositEndTime = object.depositEndTime; - } else { - message.depositEndTime = undefined; - } - if (object.totalDeposit !== undefined && object.totalDeposit !== null) { - for (const e of object.totalDeposit) { - message.totalDeposit.push(Coin.fromPartial(e)); - } - } - if ( - object.votingStartTime !== undefined && - object.votingStartTime !== null - ) { - message.votingStartTime = object.votingStartTime; - } else { - message.votingStartTime = undefined; - } - if (object.votingEndTime !== undefined && object.votingEndTime !== null) { - message.votingEndTime = object.votingEndTime; - } else { - message.votingEndTime = undefined; - } - return message; - }, -}; - -const baseTallyResult: object = { - yes: "", - abstain: "", - no: "", - noWithVeto: "", -}; - -export const TallyResult = { - encode(message: TallyResult, writer: Writer = Writer.create()): Writer { - if (message.yes !== "") { - writer.uint32(10).string(message.yes); - } - if (message.abstain !== "") { - writer.uint32(18).string(message.abstain); - } - if (message.no !== "") { - writer.uint32(26).string(message.no); - } - if (message.noWithVeto !== "") { - writer.uint32(34).string(message.noWithVeto); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TallyResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyResult } as TallyResult; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes = reader.string(); - break; - case 2: - message.abstain = reader.string(); - break; - case 3: - message.no = reader.string(); - break; - case 4: - message.noWithVeto = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TallyResult { - const message = { ...baseTallyResult } as TallyResult; - if (object.yes !== undefined && object.yes !== null) { - message.yes = String(object.yes); - } else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = String(object.abstain); - } else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = String(object.no); - } else { - message.no = ""; - } - if (object.noWithVeto !== undefined && object.noWithVeto !== null) { - message.noWithVeto = String(object.noWithVeto); - } else { - message.noWithVeto = ""; - } - return message; - }, - - toJSON(message: TallyResult): unknown { - const obj: any = {}; - message.yes !== undefined && (obj.yes = message.yes); - message.abstain !== undefined && (obj.abstain = message.abstain); - message.no !== undefined && (obj.no = message.no); - message.noWithVeto !== undefined && (obj.noWithVeto = message.noWithVeto); - return obj; - }, - - fromPartial(object: DeepPartial): TallyResult { - const message = { ...baseTallyResult } as TallyResult; - if (object.yes !== undefined && object.yes !== null) { - message.yes = object.yes; - } else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = object.abstain; - } else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = object.no; - } else { - message.no = ""; - } - if (object.noWithVeto !== undefined && object.noWithVeto !== null) { - message.noWithVeto = object.noWithVeto; - } else { - message.noWithVeto = ""; - } - return message; - }, -}; - -const baseVote: object = { proposalId: 0, voter: "", option: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } else { - message.option = 0; - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } else { - message.option = 0; - } - return message; - }, -}; - -const baseDepositParams: object = {}; - -export const DepositParams = { - encode(message: DepositParams, writer: Writer = Writer.create()): Writer { - for (const v of message.minDeposit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.maxDepositPeriod !== undefined) { - Duration.encode( - message.maxDepositPeriod, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DepositParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDepositParams } as DepositParams; - message.minDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DepositParams { - const message = { ...baseDepositParams } as DepositParams; - message.minDeposit = []; - if (object.minDeposit !== undefined && object.minDeposit !== null) { - for (const e of object.minDeposit) { - message.minDeposit.push(Coin.fromJSON(e)); - } - } - if ( - object.maxDepositPeriod !== undefined && - object.maxDepositPeriod !== null - ) { - message.maxDepositPeriod = Duration.fromJSON(object.maxDepositPeriod); - } else { - message.maxDepositPeriod = undefined; - } - return message; - }, - - toJSON(message: DepositParams): unknown { - const obj: any = {}; - if (message.minDeposit) { - obj.minDeposit = message.minDeposit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.minDeposit = []; - } - message.maxDepositPeriod !== undefined && - (obj.maxDepositPeriod = message.maxDepositPeriod - ? Duration.toJSON(message.maxDepositPeriod) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): DepositParams { - const message = { ...baseDepositParams } as DepositParams; - message.minDeposit = []; - if (object.minDeposit !== undefined && object.minDeposit !== null) { - for (const e of object.minDeposit) { - message.minDeposit.push(Coin.fromPartial(e)); - } - } - if ( - object.maxDepositPeriod !== undefined && - object.maxDepositPeriod !== null - ) { - message.maxDepositPeriod = Duration.fromPartial(object.maxDepositPeriod); - } else { - message.maxDepositPeriod = undefined; - } - return message; - }, -}; - -const baseVotingParams: object = {}; - -export const VotingParams = { - encode(message: VotingParams, writer: Writer = Writer.create()): Writer { - if (message.votingPeriod !== undefined) { - Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VotingParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVotingParams } as VotingParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VotingParams { - const message = { ...baseVotingParams } as VotingParams; - if (object.votingPeriod !== undefined && object.votingPeriod !== null) { - message.votingPeriod = Duration.fromJSON(object.votingPeriod); - } else { - message.votingPeriod = undefined; - } - return message; - }, - - toJSON(message: VotingParams): unknown { - const obj: any = {}; - message.votingPeriod !== undefined && - (obj.votingPeriod = message.votingPeriod - ? Duration.toJSON(message.votingPeriod) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): VotingParams { - const message = { ...baseVotingParams } as VotingParams; - if (object.votingPeriod !== undefined && object.votingPeriod !== null) { - message.votingPeriod = Duration.fromPartial(object.votingPeriod); - } else { - message.votingPeriod = undefined; - } - return message; - }, -}; - -const baseTallyParams: object = {}; - -export const TallyParams = { - encode(message: TallyParams, writer: Writer = Writer.create()): Writer { - if (message.quorum.length !== 0) { - writer.uint32(10).bytes(message.quorum); - } - if (message.threshold.length !== 0) { - writer.uint32(18).bytes(message.threshold); - } - if (message.vetoThreshold.length !== 0) { - writer.uint32(26).bytes(message.vetoThreshold); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TallyParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyParams } as TallyParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.vetoThreshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TallyParams { - const message = { ...baseTallyParams } as TallyParams; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = bytesFromBase64(object.quorum); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = bytesFromBase64(object.threshold); - } - if (object.vetoThreshold !== undefined && object.vetoThreshold !== null) { - message.vetoThreshold = bytesFromBase64(object.vetoThreshold); - } - return message; - }, - - toJSON(message: TallyParams): unknown { - const obj: any = {}; - message.quorum !== undefined && - (obj.quorum = base64FromBytes( - message.quorum !== undefined ? message.quorum : new Uint8Array() - )); - message.threshold !== undefined && - (obj.threshold = base64FromBytes( - message.threshold !== undefined ? message.threshold : new Uint8Array() - )); - message.vetoThreshold !== undefined && - (obj.vetoThreshold = base64FromBytes( - message.vetoThreshold !== undefined - ? message.vetoThreshold - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): TallyParams { - const message = { ...baseTallyParams } as TallyParams; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = object.quorum; - } else { - message.quorum = new Uint8Array(); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = object.threshold; - } else { - message.threshold = new Uint8Array(); - } - if (object.vetoThreshold !== undefined && object.vetoThreshold !== null) { - message.vetoThreshold = object.vetoThreshold; - } else { - message.vetoThreshold = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts deleted file mode 100644 index fc28e14..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { ProposalStatus, Proposal, Vote, VotingParams, DepositParams, TallyParams, Deposit, TallyResult } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, Writer } from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponse { - proposal: Proposal | undefined; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequest { - /** proposal_status defines the status of the proposals. */ - proposalStatus: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponse { - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** voter defines the oter address for the proposals. */ - voter: string; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponse { - /** vote defined the queried vote. */ - vote: Vote | undefined; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponse { - /** votes defined the queried votes. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - paramsType: string; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams: VotingParams | undefined; - /** deposit_params defines the parameters related to deposit. */ - depositParams: DepositParams | undefined; - /** tally_params defines the parameters related to tally. */ - tallyParams: TallyParams | undefined; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit: Deposit | undefined; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponse { - deposits: Deposit[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} -export declare const QueryProposalRequest: { - encode(message: QueryProposalRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalRequest; - fromJSON(object: any): QueryProposalRequest; - toJSON(message: QueryProposalRequest): unknown; - fromPartial(object: DeepPartial): QueryProposalRequest; -}; -export declare const QueryProposalResponse: { - encode(message: QueryProposalResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalResponse; - fromJSON(object: any): QueryProposalResponse; - toJSON(message: QueryProposalResponse): unknown; - fromPartial(object: DeepPartial): QueryProposalResponse; -}; -export declare const QueryProposalsRequest: { - encode(message: QueryProposalsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalsRequest; - fromJSON(object: any): QueryProposalsRequest; - toJSON(message: QueryProposalsRequest): unknown; - fromPartial(object: DeepPartial): QueryProposalsRequest; -}; -export declare const QueryProposalsResponse: { - encode(message: QueryProposalsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalsResponse; - fromJSON(object: any): QueryProposalsResponse; - toJSON(message: QueryProposalsResponse): unknown; - fromPartial(object: DeepPartial): QueryProposalsResponse; -}; -export declare const QueryVoteRequest: { - encode(message: QueryVoteRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVoteRequest; - fromJSON(object: any): QueryVoteRequest; - toJSON(message: QueryVoteRequest): unknown; - fromPartial(object: DeepPartial): QueryVoteRequest; -}; -export declare const QueryVoteResponse: { - encode(message: QueryVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVoteResponse; - fromJSON(object: any): QueryVoteResponse; - toJSON(message: QueryVoteResponse): unknown; - fromPartial(object: DeepPartial): QueryVoteResponse; -}; -export declare const QueryVotesRequest: { - encode(message: QueryVotesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVotesRequest; - fromJSON(object: any): QueryVotesRequest; - toJSON(message: QueryVotesRequest): unknown; - fromPartial(object: DeepPartial): QueryVotesRequest; -}; -export declare const QueryVotesResponse: { - encode(message: QueryVotesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVotesResponse; - fromJSON(object: any): QueryVotesResponse; - toJSON(message: QueryVotesResponse): unknown; - fromPartial(object: DeepPartial): QueryVotesResponse; -}; -export declare const QueryParamsRequest: { - encode(message: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(object: any): QueryParamsRequest; - toJSON(message: QueryParamsRequest): unknown; - fromPartial(object: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryDepositRequest: { - encode(message: QueryDepositRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositRequest; - fromJSON(object: any): QueryDepositRequest; - toJSON(message: QueryDepositRequest): unknown; - fromPartial(object: DeepPartial): QueryDepositRequest; -}; -export declare const QueryDepositResponse: { - encode(message: QueryDepositResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositResponse; - fromJSON(object: any): QueryDepositResponse; - toJSON(message: QueryDepositResponse): unknown; - fromPartial(object: DeepPartial): QueryDepositResponse; -}; -export declare const QueryDepositsRequest: { - encode(message: QueryDepositsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositsRequest; - fromJSON(object: any): QueryDepositsRequest; - toJSON(message: QueryDepositsRequest): unknown; - fromPartial(object: DeepPartial): QueryDepositsRequest; -}; -export declare const QueryDepositsResponse: { - encode(message: QueryDepositsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositsResponse; - fromJSON(object: any): QueryDepositsResponse; - toJSON(message: QueryDepositsResponse): unknown; - fromPartial(object: DeepPartial): QueryDepositsResponse; -}; -export declare const QueryTallyResultRequest: { - encode(message: QueryTallyResultRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTallyResultRequest; - fromJSON(object: any): QueryTallyResultRequest; - toJSON(message: QueryTallyResultRequest): unknown; - fromPartial(object: DeepPartial): QueryTallyResultRequest; -}; -export declare const QueryTallyResultResponse: { - encode(message: QueryTallyResultResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTallyResultResponse; - fromJSON(object: any): QueryTallyResultResponse; - toJSON(message: QueryTallyResultResponse): unknown; - fromPartial(object: DeepPartial): QueryTallyResultResponse; -}; -/** Query defines the gRPC querier service for gov module */ -export interface Query { - /** Proposal queries proposal details based on ProposalID. */ - Proposal(request: QueryProposalRequest): Promise; - /** Proposals queries all proposals based on given status. */ - Proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ - Vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ - Votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ - Params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ - Deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ - Deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ - TallyResult(request: QueryTallyResultRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Proposal(request: QueryProposalRequest): Promise; - Proposals(request: QueryProposalsRequest): Promise; - Vote(request: QueryVoteRequest): Promise; - Votes(request: QueryVotesRequest): Promise; - Params(request: QueryParamsRequest): Promise; - Deposit(request: QueryDepositRequest): Promise; - Deposits(request: QueryDepositsRequest): Promise; - TallyResult(request: QueryTallyResultRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js deleted file mode 100644 index d216a23..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js +++ /dev/null @@ -1,1188 +0,0 @@ -/* eslint-disable */ -import { Proposal, Vote, VotingParams, DepositParams, TallyParams, Deposit, TallyResult, proposalStatusFromJSON, proposalStatusToJSON, } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.gov.v1beta1"; -const baseQueryProposalRequest = { proposalId: 0 }; -export const QueryProposalRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - return message; - }, -}; -const baseQueryProposalResponse = {}; -export const QueryProposalResponse = { - encode(message, writer = Writer.create()) { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalResponse }; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromJSON(object.proposal); - } - else { - message.proposal = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposal !== undefined && - (obj.proposal = message.proposal - ? Proposal.toJSON(message.proposal) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalResponse }; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromPartial(object.proposal); - } - else { - message.proposal = undefined; - } - return message; - }, -}; -const baseQueryProposalsRequest = { - proposalStatus: 0, - voter: "", - depositor: "", -}; -export const QueryProposalsRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalStatus !== 0) { - writer.uint32(8).int32(message.proposalStatus); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.depositor !== "") { - writer.uint32(26).string(message.depositor); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalStatus = reader.int32(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalsRequest }; - if (object.proposalStatus !== undefined && object.proposalStatus !== null) { - message.proposalStatus = proposalStatusFromJSON(object.proposalStatus); - } - else { - message.proposalStatus = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalStatus !== undefined && - (obj.proposalStatus = proposalStatusToJSON(message.proposalStatus)); - message.voter !== undefined && (obj.voter = message.voter); - message.depositor !== undefined && (obj.depositor = message.depositor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalsRequest }; - if (object.proposalStatus !== undefined && object.proposalStatus !== null) { - message.proposalStatus = object.proposalStatus; - } - else { - message.proposalStatus = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryProposalsResponse = {}; -export const QueryProposalsResponse = { - encode(message, writer = Writer.create()) { - 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, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsResponse }; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalsResponse }; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.proposals) { - obj.proposals = message.proposals.map((e) => e ? Proposal.toJSON(e) : undefined); - } - else { - obj.proposals = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalsResponse }; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryVoteRequest = { proposalId: 0, voter: "" }; -export const QueryVoteRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVoteRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVoteRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - return message; - }, -}; -const baseQueryVoteResponse = {}; -export const QueryVoteResponse = { - encode(message, writer = Writer.create()) { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVoteResponse }; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromJSON(object.vote); - } - else { - message.vote = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.vote !== undefined && - (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVoteResponse }; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromPartial(object.vote); - } - else { - message.vote = undefined; - } - return message; - }, -}; -const baseQueryVotesRequest = { proposalId: 0 }; -export const QueryVotesRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVotesRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVotesRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryVotesResponse = {}; -export const QueryVotesResponse = { - encode(message, writer = Writer.create()) { - 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, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesResponse }; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVotesResponse }; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } - else { - obj.votes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVotesResponse }; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = { paramsType: "" }; -export const QueryParamsRequest = { - encode(message, writer = Writer.create()) { - if (message.paramsType !== "") { - writer.uint32(10).string(message.paramsType); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paramsType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsRequest }; - if (object.paramsType !== undefined && object.paramsType !== null) { - message.paramsType = String(object.paramsType); - } - else { - message.paramsType = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.paramsType !== undefined && (obj.paramsType = message.paramsType); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsRequest }; - if (object.paramsType !== undefined && object.paramsType !== null) { - message.paramsType = object.paramsType; - } - else { - message.paramsType = ""; - } - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(10).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(18).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 3: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromJSON(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromJSON(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromJSON(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.votingParams !== undefined && - (obj.votingParams = message.votingParams - ? VotingParams.toJSON(message.votingParams) - : undefined); - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); - message.tallyParams !== undefined && - (obj.tallyParams = message.tallyParams - ? TallyParams.toJSON(message.tallyParams) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromPartial(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromPartial(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromPartial(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, -}; -const baseQueryDepositRequest = { proposalId: 0, depositor: "" }; -export const QueryDepositRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - return message; - }, -}; -const baseQueryDepositResponse = {}; -export const QueryDepositResponse = { - encode(message, writer = Writer.create()) { - if (message.deposit !== undefined) { - Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositResponse }; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromJSON(object.deposit); - } - else { - message.deposit = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Deposit.toJSON(message.deposit) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositResponse }; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromPartial(object.deposit); - } - else { - message.deposit = undefined; - } - return message; - }, -}; -const baseQueryDepositsRequest = { proposalId: 0 }; -export const QueryDepositsRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositsRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositsRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDepositsResponse = {}; -export const QueryDepositsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.deposits) { - Deposit.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsResponse }; - message.deposits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositsResponse }; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.deposits) { - obj.deposits = message.deposits.map((e) => e ? Deposit.toJSON(e) : undefined); - } - else { - obj.deposits = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositsResponse }; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryTallyResultRequest = { proposalId: 0 }; -export const QueryTallyResultRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTallyResultRequest, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTallyResultRequest, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - return message; - }, -}; -const baseQueryTallyResultResponse = {}; -export const QueryTallyResultResponse = { - encode(message, writer = Writer.create()) { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTallyResultResponse, - }; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromJSON(object.tally); - } - else { - message.tally = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.tally !== undefined && - (obj.tally = message.tally - ? TallyResult.toJSON(message.tally) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTallyResultResponse, - }; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromPartial(object.tally); - } - else { - message.tally = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Proposal(request) { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposal", data); - return promise.then((data) => QueryProposalResponse.decode(new Reader(data))); - } - Proposals(request) { - const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposals", data); - return promise.then((data) => QueryProposalsResponse.decode(new Reader(data))); - } - Vote(request) { - const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data); - return promise.then((data) => QueryVoteResponse.decode(new Reader(data))); - } - Votes(request) { - const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data); - return promise.then((data) => QueryVotesResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - Deposit(request) { - const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposit", data); - return promise.then((data) => QueryDepositResponse.decode(new Reader(data))); - } - Deposits(request) { - const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposits", data); - return promise.then((data) => QueryDepositsResponse.decode(new Reader(data))); - } - TallyResult(request) { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "TallyResult", data); - return promise.then((data) => QueryTallyResultResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts deleted file mode 100644 index cde4f29..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts +++ /dev/null @@ -1,1532 +0,0 @@ -/* eslint-disable */ -import { - ProposalStatus, - Proposal, - Vote, - VotingParams, - DepositParams, - TallyParams, - Deposit, - TallyResult, - proposalStatusFromJSON, - proposalStatusToJSON, -} from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; -} - -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponse { - proposal: Proposal | undefined; -} - -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequest { - /** proposal_status defines the status of the proposals. */ - proposalStatus: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponse { - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** voter defines the oter address for the proposals. */ - voter: string; -} - -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponse { - /** vote defined the queried vote. */ - vote: Vote | undefined; -} - -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponse { - /** votes defined the queried votes. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - paramsType: string; -} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams: VotingParams | undefined; - /** deposit_params defines the parameters related to deposit. */ - depositParams: DepositParams | undefined; - /** tally_params defines the parameters related to tally. */ - tallyParams: TallyParams | undefined; -} - -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} - -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit: Deposit | undefined; -} - -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponse { - deposits: Deposit[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; -} - -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} - -const baseQueryProposalRequest: object = { proposalId: 0 }; - -export const QueryProposalRequest = { - encode( - message: QueryProposalRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalRequest } as QueryProposalRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalRequest { - const message = { ...baseQueryProposalRequest } as QueryProposalRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - return message; - }, - - toJSON(message: QueryProposalRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - - fromPartial(object: DeepPartial): QueryProposalRequest { - const message = { ...baseQueryProposalRequest } as QueryProposalRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - return message; - }, -}; - -const baseQueryProposalResponse: object = {}; - -export const QueryProposalResponse = { - encode( - message: QueryProposalResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalResponse } as QueryProposalResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalResponse { - const message = { ...baseQueryProposalResponse } as QueryProposalResponse; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromJSON(object.proposal); - } else { - message.proposal = undefined; - } - return message; - }, - - toJSON(message: QueryProposalResponse): unknown { - const obj: any = {}; - message.proposal !== undefined && - (obj.proposal = message.proposal - ? Proposal.toJSON(message.proposal) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryProposalResponse { - const message = { ...baseQueryProposalResponse } as QueryProposalResponse; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromPartial(object.proposal); - } else { - message.proposal = undefined; - } - return message; - }, -}; - -const baseQueryProposalsRequest: object = { - proposalStatus: 0, - voter: "", - depositor: "", -}; - -export const QueryProposalsRequest = { - encode( - message: QueryProposalsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposalStatus !== 0) { - writer.uint32(8).int32(message.proposalStatus); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.depositor !== "") { - writer.uint32(26).string(message.depositor); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsRequest } as QueryProposalsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalStatus = reader.int32() as any; - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalsRequest { - const message = { ...baseQueryProposalsRequest } as QueryProposalsRequest; - if (object.proposalStatus !== undefined && object.proposalStatus !== null) { - message.proposalStatus = proposalStatusFromJSON(object.proposalStatus); - } else { - message.proposalStatus = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryProposalsRequest): unknown { - const obj: any = {}; - message.proposalStatus !== undefined && - (obj.proposalStatus = proposalStatusToJSON(message.proposalStatus)); - message.voter !== undefined && (obj.voter = message.voter); - message.depositor !== undefined && (obj.depositor = message.depositor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryProposalsRequest { - const message = { ...baseQueryProposalsRequest } as QueryProposalsRequest; - if (object.proposalStatus !== undefined && object.proposalStatus !== null) { - message.proposalStatus = object.proposalStatus; - } else { - message.proposalStatus = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryProposalsResponse: object = {}; - -export const QueryProposalsResponse = { - encode( - message: QueryProposalsResponse, - writer: Writer = Writer.create() - ): 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: Reader | Uint8Array, length?: number): QueryProposalsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsResponse } as QueryProposalsResponse; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalsResponse { - const message = { ...baseQueryProposalsResponse } as QueryProposalsResponse; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryProposalsResponse): unknown { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map((e) => - e ? Proposal.toJSON(e) : undefined - ); - } else { - obj.proposals = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryProposalsResponse { - const message = { ...baseQueryProposalsResponse } as QueryProposalsResponse; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryVoteRequest: object = { proposalId: 0, voter: "" }; - -export const QueryVoteRequest = { - encode(message: QueryVoteRequest, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVoteRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteRequest } as QueryVoteRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVoteRequest { - const message = { ...baseQueryVoteRequest } as QueryVoteRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - return message; - }, - - toJSON(message: QueryVoteRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVoteRequest { - const message = { ...baseQueryVoteRequest } as QueryVoteRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - return message; - }, -}; - -const baseQueryVoteResponse: object = {}; - -export const QueryVoteResponse = { - encode(message: QueryVoteResponse, writer: Writer = Writer.create()): Writer { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteResponse } as QueryVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVoteResponse { - const message = { ...baseQueryVoteResponse } as QueryVoteResponse; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromJSON(object.vote); - } else { - message.vote = undefined; - } - return message; - }, - - toJSON(message: QueryVoteResponse): unknown { - const obj: any = {}; - message.vote !== undefined && - (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVoteResponse { - const message = { ...baseQueryVoteResponse } as QueryVoteResponse; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromPartial(object.vote); - } else { - message.vote = undefined; - } - return message; - }, -}; - -const baseQueryVotesRequest: object = { proposalId: 0 }; - -export const QueryVotesRequest = { - encode(message: QueryVotesRequest, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVotesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesRequest } as QueryVotesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVotesRequest { - const message = { ...baseQueryVotesRequest } as QueryVotesRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryVotesRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVotesRequest { - const message = { ...baseQueryVotesRequest } as QueryVotesRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryVotesResponse: object = {}; - -export const QueryVotesResponse = { - encode( - message: QueryVotesResponse, - writer: Writer = Writer.create() - ): 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: Reader | Uint8Array, length?: number): QueryVotesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesResponse } as QueryVotesResponse; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVotesResponse { - const message = { ...baseQueryVotesResponse } as QueryVotesResponse; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryVotesResponse): unknown { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } else { - obj.votes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVotesResponse { - const message = { ...baseQueryVotesResponse } as QueryVotesResponse; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = { paramsType: "" }; - -export const QueryParamsRequest = { - encode( - message: QueryParamsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.paramsType !== "") { - writer.uint32(10).string(message.paramsType); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paramsType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - if (object.paramsType !== undefined && object.paramsType !== null) { - message.paramsType = String(object.paramsType); - } else { - message.paramsType = ""; - } - return message; - }, - - toJSON(message: QueryParamsRequest): unknown { - const obj: any = {}; - message.paramsType !== undefined && (obj.paramsType = message.paramsType); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - if (object.paramsType !== undefined && object.paramsType !== null) { - message.paramsType = object.paramsType; - } else { - message.paramsType = ""; - } - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.votingParams !== undefined) { - VotingParams.encode( - message.votingParams, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode( - message.depositParams, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode( - message.tallyParams, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 3: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromJSON(object.votingParams); - } else { - message.votingParams = undefined; - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromJSON(object.depositParams); - } else { - message.depositParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromJSON(object.tallyParams); - } else { - message.tallyParams = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.votingParams !== undefined && - (obj.votingParams = message.votingParams - ? VotingParams.toJSON(message.votingParams) - : undefined); - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); - message.tallyParams !== undefined && - (obj.tallyParams = message.tallyParams - ? TallyParams.toJSON(message.tallyParams) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromPartial(object.votingParams); - } else { - message.votingParams = undefined; - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromPartial(object.depositParams); - } else { - message.depositParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromPartial(object.tallyParams); - } else { - message.tallyParams = undefined; - } - return message; - }, -}; - -const baseQueryDepositRequest: object = { proposalId: 0, depositor: "" }; - -export const QueryDepositRequest = { - encode( - message: QueryDepositRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositRequest } as QueryDepositRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositRequest { - const message = { ...baseQueryDepositRequest } as QueryDepositRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - return message; - }, - - toJSON(message: QueryDepositRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - - fromPartial(object: DeepPartial): QueryDepositRequest { - const message = { ...baseQueryDepositRequest } as QueryDepositRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - return message; - }, -}; - -const baseQueryDepositResponse: object = {}; - -export const QueryDepositResponse = { - encode( - message: QueryDepositResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.deposit !== undefined) { - Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositResponse } as QueryDepositResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositResponse { - const message = { ...baseQueryDepositResponse } as QueryDepositResponse; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromJSON(object.deposit); - } else { - message.deposit = undefined; - } - return message; - }, - - toJSON(message: QueryDepositResponse): unknown { - const obj: any = {}; - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Deposit.toJSON(message.deposit) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryDepositResponse { - const message = { ...baseQueryDepositResponse } as QueryDepositResponse; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromPartial(object.deposit); - } else { - message.deposit = undefined; - } - return message; - }, -}; - -const baseQueryDepositsRequest: object = { proposalId: 0 }; - -export const QueryDepositsRequest = { - encode( - message: QueryDepositsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsRequest } as QueryDepositsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositsRequest { - const message = { ...baseQueryDepositsRequest } as QueryDepositsRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDepositsRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryDepositsRequest { - const message = { ...baseQueryDepositsRequest } as QueryDepositsRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDepositsResponse: object = {}; - -export const QueryDepositsResponse = { - encode( - message: QueryDepositsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsResponse } as QueryDepositsResponse; - message.deposits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositsResponse { - const message = { ...baseQueryDepositsResponse } as QueryDepositsResponse; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDepositsResponse): unknown { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map((e) => - e ? Deposit.toJSON(e) : undefined - ); - } else { - obj.deposits = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDepositsResponse { - const message = { ...baseQueryDepositsResponse } as QueryDepositsResponse; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryTallyResultRequest: object = { proposalId: 0 }; - -export const QueryTallyResultRequest = { - encode( - message: QueryTallyResultRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryTallyResultRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultRequest, - } as QueryTallyResultRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTallyResultRequest { - const message = { - ...baseQueryTallyResultRequest, - } as QueryTallyResultRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - return message; - }, - - toJSON(message: QueryTallyResultRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTallyResultRequest { - const message = { - ...baseQueryTallyResultRequest, - } as QueryTallyResultRequest; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - return message; - }, -}; - -const baseQueryTallyResultResponse: object = {}; - -export const QueryTallyResultResponse = { - encode( - message: QueryTallyResultResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryTallyResultResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultResponse, - } as QueryTallyResultResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTallyResultResponse { - const message = { - ...baseQueryTallyResultResponse, - } as QueryTallyResultResponse; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromJSON(object.tally); - } else { - message.tally = undefined; - } - return message; - }, - - toJSON(message: QueryTallyResultResponse): unknown { - const obj: any = {}; - message.tally !== undefined && - (obj.tally = message.tally - ? TallyResult.toJSON(message.tally) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTallyResultResponse { - const message = { - ...baseQueryTallyResultResponse, - } as QueryTallyResultResponse; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromPartial(object.tally); - } else { - message.tally = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service for gov module */ -export interface Query { - /** Proposal queries proposal details based on ProposalID. */ - Proposal(request: QueryProposalRequest): Promise; - /** Proposals queries all proposals based on given status. */ - Proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ - Vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ - Votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ - Params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ - Deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ - Deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ - TallyResult( - request: QueryTallyResultRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Proposal(request: QueryProposalRequest): Promise { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Proposal", - data - ); - return promise.then((data) => - QueryProposalResponse.decode(new Reader(data)) - ); - } - - Proposals(request: QueryProposalsRequest): Promise { - const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Proposals", - data - ); - return promise.then((data) => - QueryProposalsResponse.decode(new Reader(data)) - ); - } - - Vote(request: QueryVoteRequest): Promise { - const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data); - return promise.then((data) => QueryVoteResponse.decode(new Reader(data))); - } - - Votes(request: QueryVotesRequest): Promise { - const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data); - return promise.then((data) => QueryVotesResponse.decode(new Reader(data))); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - Deposit(request: QueryDepositRequest): Promise { - const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Deposit", - data - ); - return promise.then((data) => - QueryDepositResponse.decode(new Reader(data)) - ); - } - - Deposits(request: QueryDepositsRequest): Promise { - const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Deposits", - data - ); - return promise.then((data) => - QueryDepositsResponse.decode(new Reader(data)) - ); - } - - TallyResult( - request: QueryTallyResultRequest - ): Promise { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "TallyResult", - data - ); - return promise.then((data) => - QueryTallyResultResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts deleted file mode 100644 index 7afb806..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { VoteOption } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposal { - content: Any | undefined; - initialDeposit: Coin[]; - proposer: string; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - proposalId: number; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVote { - proposalId: number; - voter: string; - option: VoteOption; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse { -} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDeposit { - proposalId: number; - depositor: string; - amount: Coin[]; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponse { -} -export declare const MsgSubmitProposal: { - encode(message: MsgSubmitProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitProposal; - fromJSON(object: any): MsgSubmitProposal; - toJSON(message: MsgSubmitProposal): unknown; - fromPartial(object: DeepPartial): MsgSubmitProposal; -}; -export declare const MsgSubmitProposalResponse: { - encode(message: MsgSubmitProposalResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitProposalResponse; - fromJSON(object: any): MsgSubmitProposalResponse; - toJSON(message: MsgSubmitProposalResponse): unknown; - fromPartial(object: DeepPartial): MsgSubmitProposalResponse; -}; -export declare const MsgVote: { - encode(message: MsgVote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVote; - fromJSON(object: any): MsgVote; - toJSON(message: MsgVote): unknown; - fromPartial(object: DeepPartial): MsgVote; -}; -export declare const MsgVoteResponse: { - encode(_: MsgVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVoteResponse; - fromJSON(_: any): MsgVoteResponse; - toJSON(_: MsgVoteResponse): unknown; - fromPartial(_: DeepPartial): MsgVoteResponse; -}; -export declare const MsgDeposit: { - encode(message: MsgDeposit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDeposit; - fromJSON(object: any): MsgDeposit; - toJSON(message: MsgDeposit): unknown; - fromPartial(object: DeepPartial): MsgDeposit; -}; -export declare const MsgDepositResponse: { - encode(_: MsgDepositResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDepositResponse; - fromJSON(_: any): MsgDepositResponse; - toJSON(_: MsgDepositResponse): unknown; - fromPartial(_: DeepPartial): MsgDepositResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** SubmitProposal defines a method to create new proposal given a content. */ - SubmitProposal(request: MsgSubmitProposal): Promise; - /** Vote defines a method to add a vote on a specific proposal. */ - Vote(request: MsgVote): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ - Deposit(request: MsgDeposit): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - SubmitProposal(request: MsgSubmitProposal): Promise; - Vote(request: MsgVote): Promise; - Deposit(request: MsgDeposit): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js deleted file mode 100644 index 53178b4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js +++ /dev/null @@ -1,450 +0,0 @@ -/* eslint-disable */ -import { voteOptionFromJSON, voteOptionToJSON, } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.gov.v1beta1"; -const baseMsgSubmitProposal = { proposer: "" }; -export const MsgSubmitProposal = { - encode(message, writer = Writer.create()) { - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.initialDeposit) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.proposer !== "") { - writer.uint32(26).string(message.proposer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitProposal }; - message.initialDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = Any.decode(reader, reader.uint32()); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSubmitProposal }; - message.initialDeposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } - else { - message.content = undefined; - } - if (object.initialDeposit !== undefined && object.initialDeposit !== null) { - for (const e of object.initialDeposit) { - message.initialDeposit.push(Coin.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = String(object.proposer); - } - else { - message.proposer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - if (message.initialDeposit) { - obj.initialDeposit = message.initialDeposit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.initialDeposit = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSubmitProposal }; - message.initialDeposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } - else { - message.content = undefined; - } - if (object.initialDeposit !== undefined && object.initialDeposit !== null) { - for (const e of object.initialDeposit) { - message.initialDeposit.push(Coin.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = object.proposer; - } - else { - message.proposer = ""; - } - return message; - }, -}; -const baseMsgSubmitProposalResponse = { proposalId: 0 }; -export const MsgSubmitProposalResponse = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitProposalResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgSubmitProposalResponse, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgSubmitProposalResponse, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - return message; - }, -}; -const baseMsgVote = { proposalId: 0, voter: "", option: 0 }; -export const MsgVote = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgVote }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } - else { - message.option = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgVote }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } - else { - message.option = 0; - } - return message; - }, -}; -const baseMsgVoteResponse = {}; -export const MsgVoteResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVoteResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgVoteResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgVoteResponse }; - return message; - }, -}; -const baseMsgDeposit = { proposalId: 0, depositor: "" }; -export const MsgDeposit = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDeposit }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgDepositResponse = {}; -export const MsgDepositResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDepositResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgDepositResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgDepositResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - SubmitProposal(request) { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "SubmitProposal", data); - return promise.then((data) => MsgSubmitProposalResponse.decode(new Reader(data))); - } - Vote(request) { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Vote", data); - return promise.then((data) => MsgVoteResponse.decode(new Reader(data))); - } - Deposit(request) { - const data = MsgDeposit.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Deposit", data); - return promise.then((data) => MsgDepositResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts deleted file mode 100644 index 0b29e39..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts +++ /dev/null @@ -1,562 +0,0 @@ -/* eslint-disable */ -import { - VoteOption, - voteOptionFromJSON, - voteOptionToJSON, -} from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposal { - content: Any | undefined; - initialDeposit: Coin[]; - proposer: string; -} - -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - proposalId: number; -} - -/** MsgVote defines a message to cast a vote. */ -export interface MsgVote { - proposalId: number; - voter: string; - option: VoteOption; -} - -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse {} - -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDeposit { - proposalId: number; - depositor: string; - amount: Coin[]; -} - -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponse {} - -const baseMsgSubmitProposal: object = { proposer: "" }; - -export const MsgSubmitProposal = { - encode(message: MsgSubmitProposal, writer: Writer = Writer.create()): Writer { - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.initialDeposit) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.proposer !== "") { - writer.uint32(26).string(message.proposer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSubmitProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitProposal } as MsgSubmitProposal; - message.initialDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = Any.decode(reader, reader.uint32()); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitProposal { - const message = { ...baseMsgSubmitProposal } as MsgSubmitProposal; - message.initialDeposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } else { - message.content = undefined; - } - if (object.initialDeposit !== undefined && object.initialDeposit !== null) { - for (const e of object.initialDeposit) { - message.initialDeposit.push(Coin.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = String(object.proposer); - } else { - message.proposer = ""; - } - return message; - }, - - toJSON(message: MsgSubmitProposal): unknown { - const obj: any = {}; - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - if (message.initialDeposit) { - obj.initialDeposit = message.initialDeposit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.initialDeposit = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgSubmitProposal { - const message = { ...baseMsgSubmitProposal } as MsgSubmitProposal; - message.initialDeposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } else { - message.content = undefined; - } - if (object.initialDeposit !== undefined && object.initialDeposit !== null) { - for (const e of object.initialDeposit) { - message.initialDeposit.push(Coin.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = object.proposer; - } else { - message.proposer = ""; - } - return message; - }, -}; - -const baseMsgSubmitProposalResponse: object = { proposalId: 0 }; - -export const MsgSubmitProposalResponse = { - encode( - message: MsgSubmitProposalResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSubmitProposalResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitProposalResponse, - } as MsgSubmitProposalResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitProposalResponse { - const message = { - ...baseMsgSubmitProposalResponse, - } as MsgSubmitProposalResponse; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - return message; - }, - - toJSON(message: MsgSubmitProposalResponse): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSubmitProposalResponse { - const message = { - ...baseMsgSubmitProposalResponse, - } as MsgSubmitProposalResponse; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - return message; - }, -}; - -const baseMsgVote: object = { proposalId: 0, voter: "", option: 0 }; - -export const MsgVote = { - encode(message: MsgVote, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVote } as MsgVote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgVote { - const message = { ...baseMsgVote } as MsgVote; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } else { - message.option = 0; - } - return message; - }, - - toJSON(message: MsgVote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - - fromPartial(object: DeepPartial): MsgVote { - const message = { ...baseMsgVote } as MsgVote; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } else { - message.option = 0; - } - return message; - }, -}; - -const baseMsgVoteResponse: object = {}; - -export const MsgVoteResponse = { - encode(_: MsgVoteResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVoteResponse } as MsgVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgVoteResponse { - const message = { ...baseMsgVoteResponse } as MsgVoteResponse; - return message; - }, - - toJSON(_: MsgVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgVoteResponse { - const message = { ...baseMsgVoteResponse } as MsgVoteResponse; - return message; - }, -}; - -const baseMsgDeposit: object = { proposalId: 0, depositor: "" }; - -export const MsgDeposit = { - encode(message: MsgDeposit, writer: Writer = Writer.create()): Writer { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDeposit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDeposit } as MsgDeposit; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgDeposit { - const message = { ...baseMsgDeposit } as MsgDeposit; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgDeposit): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgDeposit { - const message = { ...baseMsgDeposit } as MsgDeposit; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgDepositResponse: object = {}; - -export const MsgDepositResponse = { - encode(_: MsgDepositResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDepositResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDepositResponse } as MsgDepositResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgDepositResponse { - const message = { ...baseMsgDepositResponse } as MsgDepositResponse; - return message; - }, - - toJSON(_: MsgDepositResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgDepositResponse { - const message = { ...baseMsgDepositResponse } as MsgDepositResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** SubmitProposal defines a method to create new proposal given a content. */ - SubmitProposal( - request: MsgSubmitProposal - ): Promise; - /** Vote defines a method to add a vote on a specific proposal. */ - Vote(request: MsgVote): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ - Deposit(request: MsgDeposit): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - SubmitProposal( - request: MsgSubmitProposal - ): Promise { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Msg", - "SubmitProposal", - data - ); - return promise.then((data) => - MsgSubmitProposalResponse.decode(new Reader(data)) - ); - } - - Vote(request: MsgVote): Promise { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Vote", data); - return promise.then((data) => MsgVoteResponse.decode(new Reader(data))); - } - - Deposit(request: MsgDeposit): Promise { - const data = MsgDeposit.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Deposit", data); - return promise.then((data) => MsgDepositResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index b586045..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556fa..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index f67058a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 82af3da..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 52a7265..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js deleted file mode 100644 index 7a374ac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js +++ /dev/null @@ -1,187 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { ValidatorSigningInfo } from "./module/types/cosmos/slashing/v1beta1/slashing"; -import { Params } from "./module/types/cosmos/slashing/v1beta1/slashing"; -import { SigningInfo } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { ValidatorMissedBlocks } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { MissedBlock } from "./module/types/cosmos/slashing/v1beta1/genesis"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Params: {}, - SigningInfo: {}, - SigningInfos: {}, - _Structure: { - ValidatorSigningInfo: getStructure(ValidatorSigningInfo.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - SigningInfo: getStructure(SigningInfo.fromPartial({})), - ValidatorMissedBlocks: getStructure(ValidatorMissedBlocks.fromPartial({})), - MissedBlock: getStructure(MissedBlock.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getSigningInfo: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.SigningInfo[JSON.stringify(params)] ?? {}; - }, - getSigningInfos: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.SigningInfos[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryParams(query)).data : (await (await initQueryClient(rootGetters)).queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QuerySigningInfo({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).querySigningInfo(key.cons_address, query)).data : (await (await initQueryClient(rootGetters)).querySigningInfo(key.cons_address)).data; - commit('QUERY', { query: 'SigningInfo', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySigningInfo', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSigningInfo']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QuerySigningInfo', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QuerySigningInfos({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).querySigningInfos(query)).data : (await (await initQueryClient(rootGetters)).querySigningInfos()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).querySigningInfos({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'SigningInfos', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySigningInfos', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSigningInfos']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QuerySigningInfos', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgUnjail({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUnjail(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUnjail:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUnjail:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgUnjail({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUnjail(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUnjail:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUnjail:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts deleted file mode 100644 index e6b7ad1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { ValidatorSigningInfo } from "./module/types/cosmos/slashing/v1beta1/slashing" -import { Params } from "./module/types/cosmos/slashing/v1beta1/slashing" -import { SigningInfo } from "./module/types/cosmos/slashing/v1beta1/genesis" -import { ValidatorMissedBlocks } from "./module/types/cosmos/slashing/v1beta1/genesis" -import { MissedBlock } from "./module/types/cosmos/slashing/v1beta1/genesis" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - SigningInfo: {}, - SigningInfos: {}, - - _Structure: { - ValidatorSigningInfo: getStructure(ValidatorSigningInfo.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - SigningInfo: getStructure(SigningInfo.fromPartial({})), - ValidatorMissedBlocks: getStructure(ValidatorMissedBlocks.fromPartial({})), - MissedBlock: getStructure(MissedBlock.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getSigningInfo: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.SigningInfo[JSON.stringify(params)] ?? {} - }, - getSigningInfos: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.SigningInfos[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryParams( query)).data:(await (await initQueryClient(rootGetters)).queryParams()).data - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QuerySigningInfo({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).querySigningInfo( key.cons_address, query)).data:(await (await initQueryClient(rootGetters)).querySigningInfo( key.cons_address )).data - - commit('QUERY', { query: 'SigningInfo', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySigningInfo', payload: { options: { all }, params: {...key},query }}) - return getters['getSigningInfo']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QuerySigningInfo', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QuerySigningInfos({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).querySigningInfos( query)).data:(await (await initQueryClient(rootGetters)).querySigningInfos()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).querySigningInfos({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'SigningInfos', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySigningInfos', payload: { options: { all }, params: {...key},query }}) - return getters['getSigningInfos']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QuerySigningInfos', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgUnjail({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUnjail(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUnjail:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUnjail:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgUnjail({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUnjail(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUnjail:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUnjail:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts deleted file mode 100644 index 2ab5157..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgUnjail: (data: MsgUnjail) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js deleted file mode 100644 index c113a2f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; -const types = [ - ["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgUnjail: (data) => ({ typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts deleted file mode 100644 index 17e3a79..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; - - -const types = [ - ["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgUnjail: (data: MsgUnjail): EncodeObject => ({ typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts deleted file mode 100644 index 460ef25..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,208 +0,0 @@ -export interface ProtobufAny { - typeUrl?: string; - /** @format byte */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export declare type V1Beta1MsgUnjailResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params represents the parameters used for by the slashing module. - */ -export interface V1Beta1Params { - /** @format int64 */ - signedBlocksWindow?: string; - /** @format byte */ - minSignedPerWindow?: string; - downtimeJailDuration?: string; - /** @format byte */ - slashFractionDoubleSign?: string; - /** @format byte */ - slashFractionDowntime?: string; -} -export interface V1Beta1QueryParamsResponse { - /** Params represents the parameters used for by the slashing module. */ - params?: V1Beta1Params; -} -export interface V1Beta1QuerySigningInfoResponse { - /** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ - valSigningInfo?: V1Beta1ValidatorSigningInfo; -} -export interface V1Beta1QuerySigningInfosResponse { - info?: V1Beta1ValidatorSigningInfo[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; -} -/** -* ValidatorSigningInfo defines a validator's signing info for monitoring their -liveness activity. -*/ -export interface V1Beta1ValidatorSigningInfo { - address?: string; - /** @format int64 */ - startHeight?: string; - /** @format int64 */ - indexOffset?: string; - /** @format date-time */ - jailedUntil?: string; - tombstoned?: boolean; - /** @format int64 */ - missedBlocksCounter?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/slashing/v1beta1/slashing.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - querySigningInfos: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{consAddress} - */ - querySigningInfo: (consAddress: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js deleted file mode 100644 index 8cec4c3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js +++ /dev/null @@ -1,183 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/slashing/v1beta1/slashing.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/slashing/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - this.querySigningInfos = (query, params = {}) => this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{consAddress} - */ - this.querySigningInfo = (consAddress, params = {}) => this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts deleted file mode 100644 index e2001f9..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts +++ /dev/null @@ -1,403 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - typeUrl?: string; - - /** @format byte */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type V1Beta1MsgUnjailResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params represents the parameters used for by the slashing module. - */ -export interface V1Beta1Params { - /** @format int64 */ - signedBlocksWindow?: string; - - /** @format byte */ - minSignedPerWindow?: string; - downtimeJailDuration?: string; - - /** @format byte */ - slashFractionDoubleSign?: string; - - /** @format byte */ - slashFractionDowntime?: string; -} - -export interface V1Beta1QueryParamsResponse { - /** Params represents the parameters used for by the slashing module. */ - params?: V1Beta1Params; -} - -export interface V1Beta1QuerySigningInfoResponse { - /** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ - valSigningInfo?: V1Beta1ValidatorSigningInfo; -} - -export interface V1Beta1QuerySigningInfosResponse { - info?: V1Beta1ValidatorSigningInfo[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; -} - -/** -* ValidatorSigningInfo defines a validator's signing info for monitoring their -liveness activity. -*/ -export interface V1Beta1ValidatorSigningInfo { - address?: string; - - /** @format int64 */ - startHeight?: string; - - /** @format int64 */ - indexOffset?: string; - - /** @format date-time */ - jailedUntil?: string; - tombstoned?: boolean; - - /** @format int64 */ - missedBlocksCounter?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/slashing/v1beta1/slashing.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/slashing/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - querySigningInfos = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{consAddress} - */ - querySigningInfo = (consAddress: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts deleted file mode 100644 index ce4e2b8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo } from "../../../cosmos/slashing/v1beta1/slashing"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * signing_infos represents a map between validator addresses and their - * signing infos. - */ - signingInfos: SigningInfo[]; - /** - * signing_infos represents a map between validator addresses and their - * missed blocks. - */ - missedBlocks: ValidatorMissedBlocks[]; -} -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfo { - /** address is the validator address. */ - address: string; - /** validator_signing_info represents the signing info of this validator. */ - validatorSigningInfo: ValidatorSigningInfo | undefined; -} -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocks { - /** address is the validator address. */ - address: string; - /** missed_blocks is an array of missed blocks by the validator. */ - missedBlocks: MissedBlock[]; -} -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlock { - /** index is the height at which the block was missed. */ - index: number; - /** missed is the missed status. */ - missed: boolean; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const SigningInfo: { - encode(message: SigningInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SigningInfo; - fromJSON(object: any): SigningInfo; - toJSON(message: SigningInfo): unknown; - fromPartial(object: DeepPartial): SigningInfo; -}; -export declare const ValidatorMissedBlocks: { - encode(message: ValidatorMissedBlocks, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorMissedBlocks; - fromJSON(object: any): ValidatorMissedBlocks; - toJSON(message: ValidatorMissedBlocks): unknown; - fromPartial(object: DeepPartial): ValidatorMissedBlocks; -}; -export declare const MissedBlock: { - encode(message: MissedBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MissedBlock; - fromJSON(object: any): MissedBlock; - toJSON(message: MissedBlock): unknown; - fromPartial(object: DeepPartial): MissedBlock; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js deleted file mode 100644 index 5614f58..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js +++ /dev/null @@ -1,349 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo, } from "../../../cosmos/slashing/v1beta1/slashing"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.signingInfos) { - SigningInfo.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.missedBlocks) { - ValidatorMissedBlocks.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.signingInfos = []; - message.missedBlocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.signingInfos.push(SigningInfo.decode(reader, reader.uint32())); - break; - case 3: - message.missedBlocks.push(ValidatorMissedBlocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.signingInfos = []; - message.missedBlocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.signingInfos !== undefined && object.signingInfos !== null) { - for (const e of object.signingInfos) { - message.signingInfos.push(SigningInfo.fromJSON(e)); - } - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(ValidatorMissedBlocks.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.signingInfos) { - obj.signingInfos = message.signingInfos.map((e) => e ? SigningInfo.toJSON(e) : undefined); - } - else { - obj.signingInfos = []; - } - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map((e) => e ? ValidatorMissedBlocks.toJSON(e) : undefined); - } - else { - obj.missedBlocks = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.signingInfos = []; - message.missedBlocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.signingInfos !== undefined && object.signingInfos !== null) { - for (const e of object.signingInfos) { - message.signingInfos.push(SigningInfo.fromPartial(e)); - } - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(ValidatorMissedBlocks.fromPartial(e)); - } - } - return message; - }, -}; -const baseSigningInfo = { address: "" }; -export const SigningInfo = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.validatorSigningInfo !== undefined) { - ValidatorSigningInfo.encode(message.validatorSigningInfo, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSigningInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.validatorSigningInfo = ValidatorSigningInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.validatorSigningInfo !== undefined && - object.validatorSigningInfo !== null) { - message.validatorSigningInfo = ValidatorSigningInfo.fromJSON(object.validatorSigningInfo); - } - else { - message.validatorSigningInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.validatorSigningInfo !== undefined && - (obj.validatorSigningInfo = message.validatorSigningInfo - ? ValidatorSigningInfo.toJSON(message.validatorSigningInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.validatorSigningInfo !== undefined && - object.validatorSigningInfo !== null) { - message.validatorSigningInfo = ValidatorSigningInfo.fromPartial(object.validatorSigningInfo); - } - else { - message.validatorSigningInfo = undefined; - } - return message; - }, -}; -const baseValidatorMissedBlocks = { address: "" }; -export const ValidatorMissedBlocks = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.missedBlocks) { - MissedBlock.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorMissedBlocks }; - message.missedBlocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.missedBlocks.push(MissedBlock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorMissedBlocks }; - message.missedBlocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(MissedBlock.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map((e) => e ? MissedBlock.toJSON(e) : undefined); - } - else { - obj.missedBlocks = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorMissedBlocks }; - message.missedBlocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(MissedBlock.fromPartial(e)); - } - } - return message; - }, -}; -const baseMissedBlock = { index: 0, missed: false }; -export const MissedBlock = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).int64(message.index); - } - if (message.missed === true) { - writer.uint32(16).bool(message.missed); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMissedBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = longToNumber(reader.int64()); - break; - case 2: - message.missed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMissedBlock }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = Boolean(object.missed); - } - else { - message.missed = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.missed !== undefined && (obj.missed = message.missed); - return obj; - }, - fromPartial(object) { - const message = { ...baseMissedBlock }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = object.missed; - } - else { - message.missed = false; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts deleted file mode 100644 index 7801ebb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts +++ /dev/null @@ -1,448 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Params, - ValidatorSigningInfo, -} from "../../../cosmos/slashing/v1beta1/slashing"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * signing_infos represents a map between validator addresses and their - * signing infos. - */ - signingInfos: SigningInfo[]; - /** - * signing_infos represents a map between validator addresses and their - * missed blocks. - */ - missedBlocks: ValidatorMissedBlocks[]; -} - -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfo { - /** address is the validator address. */ - address: string; - /** validator_signing_info represents the signing info of this validator. */ - validatorSigningInfo: ValidatorSigningInfo | undefined; -} - -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocks { - /** address is the validator address. */ - address: string; - /** missed_blocks is an array of missed blocks by the validator. */ - missedBlocks: MissedBlock[]; -} - -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlock { - /** index is the height at which the block was missed. */ - index: number; - /** missed is the missed status. */ - missed: boolean; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.signingInfos) { - SigningInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.missedBlocks) { - ValidatorMissedBlocks.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.signingInfos = []; - message.missedBlocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.signingInfos.push( - SigningInfo.decode(reader, reader.uint32()) - ); - break; - case 3: - message.missedBlocks.push( - ValidatorMissedBlocks.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.signingInfos = []; - message.missedBlocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.signingInfos !== undefined && object.signingInfos !== null) { - for (const e of object.signingInfos) { - message.signingInfos.push(SigningInfo.fromJSON(e)); - } - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(ValidatorMissedBlocks.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.signingInfos) { - obj.signingInfos = message.signingInfos.map((e) => - e ? SigningInfo.toJSON(e) : undefined - ); - } else { - obj.signingInfos = []; - } - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map((e) => - e ? ValidatorMissedBlocks.toJSON(e) : undefined - ); - } else { - obj.missedBlocks = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.signingInfos = []; - message.missedBlocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.signingInfos !== undefined && object.signingInfos !== null) { - for (const e of object.signingInfos) { - message.signingInfos.push(SigningInfo.fromPartial(e)); - } - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(ValidatorMissedBlocks.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSigningInfo: object = { address: "" }; - -export const SigningInfo = { - encode(message: SigningInfo, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.validatorSigningInfo !== undefined) { - ValidatorSigningInfo.encode( - message.validatorSigningInfo, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SigningInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSigningInfo } as SigningInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.validatorSigningInfo = ValidatorSigningInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SigningInfo { - const message = { ...baseSigningInfo } as SigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if ( - object.validatorSigningInfo !== undefined && - object.validatorSigningInfo !== null - ) { - message.validatorSigningInfo = ValidatorSigningInfo.fromJSON( - object.validatorSigningInfo - ); - } else { - message.validatorSigningInfo = undefined; - } - return message; - }, - - toJSON(message: SigningInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.validatorSigningInfo !== undefined && - (obj.validatorSigningInfo = message.validatorSigningInfo - ? ValidatorSigningInfo.toJSON(message.validatorSigningInfo) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SigningInfo { - const message = { ...baseSigningInfo } as SigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if ( - object.validatorSigningInfo !== undefined && - object.validatorSigningInfo !== null - ) { - message.validatorSigningInfo = ValidatorSigningInfo.fromPartial( - object.validatorSigningInfo - ); - } else { - message.validatorSigningInfo = undefined; - } - return message; - }, -}; - -const baseValidatorMissedBlocks: object = { address: "" }; - -export const ValidatorMissedBlocks = { - encode( - message: ValidatorMissedBlocks, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.missedBlocks) { - MissedBlock.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorMissedBlocks { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorMissedBlocks } as ValidatorMissedBlocks; - message.missedBlocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.missedBlocks.push( - MissedBlock.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorMissedBlocks { - const message = { ...baseValidatorMissedBlocks } as ValidatorMissedBlocks; - message.missedBlocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(MissedBlock.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorMissedBlocks): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map((e) => - e ? MissedBlock.toJSON(e) : undefined - ); - } else { - obj.missedBlocks = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorMissedBlocks { - const message = { ...baseValidatorMissedBlocks } as ValidatorMissedBlocks; - message.missedBlocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(MissedBlock.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMissedBlock: object = { index: 0, missed: false }; - -export const MissedBlock = { - encode(message: MissedBlock, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).int64(message.index); - } - if (message.missed === true) { - writer.uint32(16).bool(message.missed); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MissedBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMissedBlock } as MissedBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = longToNumber(reader.int64() as Long); - break; - case 2: - message.missed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MissedBlock { - const message = { ...baseMissedBlock } as MissedBlock; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = Boolean(object.missed); - } else { - message.missed = false; - } - return message; - }, - - toJSON(message: MissedBlock): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.missed !== undefined && (obj.missed = message.missed); - return obj; - }, - - fromPartial(object: DeepPartial): MissedBlock { - const message = { ...baseMissedBlock } as MissedBlock; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = object.missed; - } else { - message.missed = false; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts deleted file mode 100644 index 02ca283..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo } from "../../../cosmos/slashing/v1beta1/slashing"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponse { - params: Params | undefined; -} -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequest { - /** cons_address is the address to query signing info of */ - consAddress: string; -} -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponse { - /** val_signing_info is the signing info of requested val cons address */ - valSigningInfo: ValidatorSigningInfo | undefined; -} -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequest { - pagination: PageRequest | undefined; -} -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponse { - /** info is the signing info of all validators */ - info: ValidatorSigningInfo[]; - pagination: PageResponse | undefined; -} -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QuerySigningInfoRequest: { - encode(message: QuerySigningInfoRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfoRequest; - fromJSON(object: any): QuerySigningInfoRequest; - toJSON(message: QuerySigningInfoRequest): unknown; - fromPartial(object: DeepPartial): QuerySigningInfoRequest; -}; -export declare const QuerySigningInfoResponse: { - encode(message: QuerySigningInfoResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfoResponse; - fromJSON(object: any): QuerySigningInfoResponse; - toJSON(message: QuerySigningInfoResponse): unknown; - fromPartial(object: DeepPartial): QuerySigningInfoResponse; -}; -export declare const QuerySigningInfosRequest: { - encode(message: QuerySigningInfosRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfosRequest; - fromJSON(object: any): QuerySigningInfosRequest; - toJSON(message: QuerySigningInfosRequest): unknown; - fromPartial(object: DeepPartial): QuerySigningInfosRequest; -}; -export declare const QuerySigningInfosResponse: { - encode(message: QuerySigningInfosResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfosResponse; - fromJSON(object: any): QuerySigningInfosResponse; - toJSON(message: QuerySigningInfosResponse): unknown; - fromPartial(object: DeepPartial): QuerySigningInfosResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Params queries the parameters of slashing module */ - Params(request: QueryParamsRequest): Promise; - /** SigningInfo queries the signing info of given cons address */ - SigningInfo(request: QuerySigningInfoRequest): Promise; - /** SigningInfos queries signing info of all validators */ - SigningInfos(request: QuerySigningInfosRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Params(request: QueryParamsRequest): Promise; - SigningInfo(request: QuerySigningInfoRequest): Promise; - SigningInfos(request: QuerySigningInfosRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js deleted file mode 100644 index 6346958..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js +++ /dev/null @@ -1,372 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo, } from "../../../cosmos/slashing/v1beta1/slashing"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQuerySigningInfoRequest = { consAddress: "" }; -export const QuerySigningInfoRequest = { - encode(message, writer = Writer.create()) { - if (message.consAddress !== "") { - writer.uint32(10).string(message.consAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfoRequest, - }; - if (object.consAddress !== undefined && object.consAddress !== null) { - message.consAddress = String(object.consAddress); - } - else { - message.consAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consAddress !== undefined && - (obj.consAddress = message.consAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfoRequest, - }; - if (object.consAddress !== undefined && object.consAddress !== null) { - message.consAddress = object.consAddress; - } - else { - message.consAddress = ""; - } - return message; - }, -}; -const baseQuerySigningInfoResponse = {}; -export const QuerySigningInfoResponse = { - encode(message, writer = Writer.create()) { - if (message.valSigningInfo !== undefined) { - ValidatorSigningInfo.encode(message.valSigningInfo, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.valSigningInfo = ValidatorSigningInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfoResponse, - }; - if (object.valSigningInfo !== undefined && object.valSigningInfo !== null) { - message.valSigningInfo = ValidatorSigningInfo.fromJSON(object.valSigningInfo); - } - else { - message.valSigningInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.valSigningInfo !== undefined && - (obj.valSigningInfo = message.valSigningInfo - ? ValidatorSigningInfo.toJSON(message.valSigningInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfoResponse, - }; - if (object.valSigningInfo !== undefined && object.valSigningInfo !== null) { - message.valSigningInfo = ValidatorSigningInfo.fromPartial(object.valSigningInfo); - } - else { - message.valSigningInfo = undefined; - } - return message; - }, -}; -const baseQuerySigningInfosRequest = {}; -export const QuerySigningInfosRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfosRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfosRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQuerySigningInfosResponse = {}; -export const QuerySigningInfosResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.info) { - ValidatorSigningInfo.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosResponse, - }; - message.info = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info.push(ValidatorSigningInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfosResponse, - }; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.info) { - obj.info = message.info.map((e) => e ? ValidatorSigningInfo.toJSON(e) : undefined); - } - else { - obj.info = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfosResponse, - }; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - SigningInfo(request) { - const data = QuerySigningInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "SigningInfo", data); - return promise.then((data) => QuerySigningInfoResponse.decode(new Reader(data))); - } - SigningInfos(request) { - const data = QuerySigningInfosRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "SigningInfos", data); - return promise.then((data) => QuerySigningInfosResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts deleted file mode 100644 index 10501cb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts +++ /dev/null @@ -1,554 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - Params, - ValidatorSigningInfo, -} from "../../../cosmos/slashing/v1beta1/slashing"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponse { - params: Params | undefined; -} - -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequest { - /** cons_address is the address to query signing info of */ - consAddress: string; -} - -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponse { - /** val_signing_info is the signing info of requested val cons address */ - valSigningInfo: ValidatorSigningInfo | undefined; -} - -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequest { - pagination: PageRequest | undefined; -} - -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponse { - /** info is the signing info of all validators */ - info: ValidatorSigningInfo[]; - pagination: PageResponse | undefined; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQuerySigningInfoRequest: object = { consAddress: "" }; - -export const QuerySigningInfoRequest = { - encode( - message: QuerySigningInfoRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.consAddress !== "") { - writer.uint32(10).string(message.consAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfoRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoRequest, - } as QuerySigningInfoRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfoRequest { - const message = { - ...baseQuerySigningInfoRequest, - } as QuerySigningInfoRequest; - if (object.consAddress !== undefined && object.consAddress !== null) { - message.consAddress = String(object.consAddress); - } else { - message.consAddress = ""; - } - return message; - }, - - toJSON(message: QuerySigningInfoRequest): unknown { - const obj: any = {}; - message.consAddress !== undefined && - (obj.consAddress = message.consAddress); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfoRequest { - const message = { - ...baseQuerySigningInfoRequest, - } as QuerySigningInfoRequest; - if (object.consAddress !== undefined && object.consAddress !== null) { - message.consAddress = object.consAddress; - } else { - message.consAddress = ""; - } - return message; - }, -}; - -const baseQuerySigningInfoResponse: object = {}; - -export const QuerySigningInfoResponse = { - encode( - message: QuerySigningInfoResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.valSigningInfo !== undefined) { - ValidatorSigningInfo.encode( - message.valSigningInfo, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySigningInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoResponse, - } as QuerySigningInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.valSigningInfo = ValidatorSigningInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfoResponse { - const message = { - ...baseQuerySigningInfoResponse, - } as QuerySigningInfoResponse; - if (object.valSigningInfo !== undefined && object.valSigningInfo !== null) { - message.valSigningInfo = ValidatorSigningInfo.fromJSON( - object.valSigningInfo - ); - } else { - message.valSigningInfo = undefined; - } - return message; - }, - - toJSON(message: QuerySigningInfoResponse): unknown { - const obj: any = {}; - message.valSigningInfo !== undefined && - (obj.valSigningInfo = message.valSigningInfo - ? ValidatorSigningInfo.toJSON(message.valSigningInfo) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfoResponse { - const message = { - ...baseQuerySigningInfoResponse, - } as QuerySigningInfoResponse; - if (object.valSigningInfo !== undefined && object.valSigningInfo !== null) { - message.valSigningInfo = ValidatorSigningInfo.fromPartial( - object.valSigningInfo - ); - } else { - message.valSigningInfo = undefined; - } - return message; - }, -}; - -const baseQuerySigningInfosRequest: object = {}; - -export const QuerySigningInfosRequest = { - encode( - message: QuerySigningInfosRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySigningInfosRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosRequest, - } as QuerySigningInfosRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfosRequest { - const message = { - ...baseQuerySigningInfosRequest, - } as QuerySigningInfosRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySigningInfosRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfosRequest { - const message = { - ...baseQuerySigningInfosRequest, - } as QuerySigningInfosRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQuerySigningInfosResponse: object = {}; - -export const QuerySigningInfosResponse = { - encode( - message: QuerySigningInfosResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.info) { - ValidatorSigningInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySigningInfosResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosResponse, - } as QuerySigningInfosResponse; - message.info = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info.push( - ValidatorSigningInfo.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfosResponse { - const message = { - ...baseQuerySigningInfosResponse, - } as QuerySigningInfosResponse; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySigningInfosResponse): unknown { - const obj: any = {}; - if (message.info) { - obj.info = message.info.map((e) => - e ? ValidatorSigningInfo.toJSON(e) : undefined - ); - } else { - obj.info = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfosResponse { - const message = { - ...baseQuerySigningInfosResponse, - } as QuerySigningInfosResponse; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Params queries the parameters of slashing module */ - Params(request: QueryParamsRequest): Promise; - /** SigningInfo queries the signing info of given cons address */ - SigningInfo( - request: QuerySigningInfoRequest - ): Promise; - /** SigningInfos queries signing info of all validators */ - SigningInfos( - request: QuerySigningInfosRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - SigningInfo( - request: QuerySigningInfoRequest - ): Promise { - const data = QuerySigningInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Query", - "SigningInfo", - data - ); - return promise.then((data) => - QuerySigningInfoResponse.decode(new Reader(data)) - ); - } - - SigningInfos( - request: QuerySigningInfosRequest - ): Promise { - const data = QuerySigningInfosRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Query", - "SigningInfos", - data - ); - return promise.then((data) => - QuerySigningInfosResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts deleted file mode 100644 index bccb36b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfo { - address: string; - /** height at which validator was first a candidate OR was unjailed */ - startHeight: number; - /** index offset into signed block bit array */ - indexOffset: number; - /** timestamp validator cannot be unjailed until */ - jailedUntil: Date | undefined; - /** - * whether or not a validator has been tombstoned (killed out of validator - * set) - */ - tombstoned: boolean; - /** missed blocks counter (to avoid scanning the array every time) */ - missedBlocksCounter: number; -} -/** Params represents the parameters used for by the slashing module. */ -export interface Params { - signedBlocksWindow: number; - minSignedPerWindow: Uint8Array; - downtimeJailDuration: Duration | undefined; - slashFractionDoubleSign: Uint8Array; - slashFractionDowntime: Uint8Array; -} -export declare const ValidatorSigningInfo: { - encode(message: ValidatorSigningInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSigningInfo; - fromJSON(object: any): ValidatorSigningInfo; - toJSON(message: ValidatorSigningInfo): unknown; - fromPartial(object: DeepPartial): ValidatorSigningInfo; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js deleted file mode 100644 index 15baf88..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js +++ /dev/null @@ -1,369 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseValidatorSigningInfo = { - address: "", - startHeight: 0, - indexOffset: 0, - tombstoned: false, - missedBlocksCounter: 0, -}; -export const ValidatorSigningInfo = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.startHeight !== 0) { - writer.uint32(16).int64(message.startHeight); - } - if (message.indexOffset !== 0) { - writer.uint32(24).int64(message.indexOffset); - } - if (message.jailedUntil !== undefined) { - Timestamp.encode(toTimestamp(message.jailedUntil), writer.uint32(34).fork()).ldelim(); - } - if (message.tombstoned === true) { - writer.uint32(40).bool(message.tombstoned); - } - if (message.missedBlocksCounter !== 0) { - writer.uint32(48).int64(message.missedBlocksCounter); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSigningInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.startHeight = longToNumber(reader.int64()); - break; - case 3: - message.indexOffset = longToNumber(reader.int64()); - break; - case 4: - message.jailedUntil = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.tombstoned = reader.bool(); - break; - case 6: - message.missedBlocksCounter = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.startHeight !== undefined && object.startHeight !== null) { - message.startHeight = Number(object.startHeight); - } - else { - message.startHeight = 0; - } - if (object.indexOffset !== undefined && object.indexOffset !== null) { - message.indexOffset = Number(object.indexOffset); - } - else { - message.indexOffset = 0; - } - if (object.jailedUntil !== undefined && object.jailedUntil !== null) { - message.jailedUntil = fromJsonTimestamp(object.jailedUntil); - } - else { - message.jailedUntil = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = Boolean(object.tombstoned); - } - else { - message.tombstoned = false; - } - if (object.missedBlocksCounter !== undefined && - object.missedBlocksCounter !== null) { - message.missedBlocksCounter = Number(object.missedBlocksCounter); - } - else { - message.missedBlocksCounter = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.startHeight !== undefined && - (obj.startHeight = message.startHeight); - message.indexOffset !== undefined && - (obj.indexOffset = message.indexOffset); - message.jailedUntil !== undefined && - (obj.jailedUntil = - message.jailedUntil !== undefined - ? message.jailedUntil.toISOString() - : null); - message.tombstoned !== undefined && (obj.tombstoned = message.tombstoned); - message.missedBlocksCounter !== undefined && - (obj.missedBlocksCounter = message.missedBlocksCounter); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.startHeight !== undefined && object.startHeight !== null) { - message.startHeight = object.startHeight; - } - else { - message.startHeight = 0; - } - if (object.indexOffset !== undefined && object.indexOffset !== null) { - message.indexOffset = object.indexOffset; - } - else { - message.indexOffset = 0; - } - if (object.jailedUntil !== undefined && object.jailedUntil !== null) { - message.jailedUntil = object.jailedUntil; - } - else { - message.jailedUntil = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = object.tombstoned; - } - else { - message.tombstoned = false; - } - if (object.missedBlocksCounter !== undefined && - object.missedBlocksCounter !== null) { - message.missedBlocksCounter = object.missedBlocksCounter; - } - else { - message.missedBlocksCounter = 0; - } - return message; - }, -}; -const baseParams = { signedBlocksWindow: 0 }; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.signedBlocksWindow !== 0) { - writer.uint32(8).int64(message.signedBlocksWindow); - } - if (message.minSignedPerWindow.length !== 0) { - writer.uint32(18).bytes(message.minSignedPerWindow); - } - if (message.downtimeJailDuration !== undefined) { - Duration.encode(message.downtimeJailDuration, writer.uint32(26).fork()).ldelim(); - } - if (message.slashFractionDoubleSign.length !== 0) { - writer.uint32(34).bytes(message.slashFractionDoubleSign); - } - if (message.slashFractionDowntime.length !== 0) { - writer.uint32(42).bytes(message.slashFractionDowntime); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedBlocksWindow = longToNumber(reader.int64()); - break; - case 2: - message.minSignedPerWindow = reader.bytes(); - break; - case 3: - message.downtimeJailDuration = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.slashFractionDoubleSign = reader.bytes(); - break; - case 5: - message.slashFractionDowntime = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.signedBlocksWindow !== undefined && - object.signedBlocksWindow !== null) { - message.signedBlocksWindow = Number(object.signedBlocksWindow); - } - else { - message.signedBlocksWindow = 0; - } - if (object.minSignedPerWindow !== undefined && - object.minSignedPerWindow !== null) { - message.minSignedPerWindow = bytesFromBase64(object.minSignedPerWindow); - } - if (object.downtimeJailDuration !== undefined && - object.downtimeJailDuration !== null) { - message.downtimeJailDuration = Duration.fromJSON(object.downtimeJailDuration); - } - else { - message.downtimeJailDuration = undefined; - } - if (object.slashFractionDoubleSign !== undefined && - object.slashFractionDoubleSign !== null) { - message.slashFractionDoubleSign = bytesFromBase64(object.slashFractionDoubleSign); - } - if (object.slashFractionDowntime !== undefined && - object.slashFractionDowntime !== null) { - message.slashFractionDowntime = bytesFromBase64(object.slashFractionDowntime); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.signedBlocksWindow !== undefined && - (obj.signedBlocksWindow = message.signedBlocksWindow); - message.minSignedPerWindow !== undefined && - (obj.minSignedPerWindow = base64FromBytes(message.minSignedPerWindow !== undefined - ? message.minSignedPerWindow - : new Uint8Array())); - message.downtimeJailDuration !== undefined && - (obj.downtimeJailDuration = message.downtimeJailDuration - ? Duration.toJSON(message.downtimeJailDuration) - : undefined); - message.slashFractionDoubleSign !== undefined && - (obj.slashFractionDoubleSign = base64FromBytes(message.slashFractionDoubleSign !== undefined - ? message.slashFractionDoubleSign - : new Uint8Array())); - message.slashFractionDowntime !== undefined && - (obj.slashFractionDowntime = base64FromBytes(message.slashFractionDowntime !== undefined - ? message.slashFractionDowntime - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.signedBlocksWindow !== undefined && - object.signedBlocksWindow !== null) { - message.signedBlocksWindow = object.signedBlocksWindow; - } - else { - message.signedBlocksWindow = 0; - } - if (object.minSignedPerWindow !== undefined && - object.minSignedPerWindow !== null) { - message.minSignedPerWindow = object.minSignedPerWindow; - } - else { - message.minSignedPerWindow = new Uint8Array(); - } - if (object.downtimeJailDuration !== undefined && - object.downtimeJailDuration !== null) { - message.downtimeJailDuration = Duration.fromPartial(object.downtimeJailDuration); - } - else { - message.downtimeJailDuration = undefined; - } - if (object.slashFractionDoubleSign !== undefined && - object.slashFractionDoubleSign !== null) { - message.slashFractionDoubleSign = object.slashFractionDoubleSign; - } - else { - message.slashFractionDoubleSign = new Uint8Array(); - } - if (object.slashFractionDowntime !== undefined && - object.slashFractionDowntime !== null) { - message.slashFractionDowntime = object.slashFractionDowntime; - } - else { - message.slashFractionDowntime = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts deleted file mode 100644 index 824a75c..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts +++ /dev/null @@ -1,462 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfo { - address: string; - /** height at which validator was first a candidate OR was unjailed */ - startHeight: number; - /** index offset into signed block bit array */ - indexOffset: number; - /** timestamp validator cannot be unjailed until */ - jailedUntil: Date | undefined; - /** - * whether or not a validator has been tombstoned (killed out of validator - * set) - */ - tombstoned: boolean; - /** missed blocks counter (to avoid scanning the array every time) */ - missedBlocksCounter: number; -} - -/** Params represents the parameters used for by the slashing module. */ -export interface Params { - signedBlocksWindow: number; - minSignedPerWindow: Uint8Array; - downtimeJailDuration: Duration | undefined; - slashFractionDoubleSign: Uint8Array; - slashFractionDowntime: Uint8Array; -} - -const baseValidatorSigningInfo: object = { - address: "", - startHeight: 0, - indexOffset: 0, - tombstoned: false, - missedBlocksCounter: 0, -}; - -export const ValidatorSigningInfo = { - encode( - message: ValidatorSigningInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.startHeight !== 0) { - writer.uint32(16).int64(message.startHeight); - } - if (message.indexOffset !== 0) { - writer.uint32(24).int64(message.indexOffset); - } - if (message.jailedUntil !== undefined) { - Timestamp.encode( - toTimestamp(message.jailedUntil), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.tombstoned === true) { - writer.uint32(40).bool(message.tombstoned); - } - if (message.missedBlocksCounter !== 0) { - writer.uint32(48).int64(message.missedBlocksCounter); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSigningInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSigningInfo } as ValidatorSigningInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.startHeight = longToNumber(reader.int64() as Long); - break; - case 3: - message.indexOffset = longToNumber(reader.int64() as Long); - break; - case 4: - message.jailedUntil = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.tombstoned = reader.bool(); - break; - case 6: - message.missedBlocksCounter = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSigningInfo { - const message = { ...baseValidatorSigningInfo } as ValidatorSigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.startHeight !== undefined && object.startHeight !== null) { - message.startHeight = Number(object.startHeight); - } else { - message.startHeight = 0; - } - if (object.indexOffset !== undefined && object.indexOffset !== null) { - message.indexOffset = Number(object.indexOffset); - } else { - message.indexOffset = 0; - } - if (object.jailedUntil !== undefined && object.jailedUntil !== null) { - message.jailedUntil = fromJsonTimestamp(object.jailedUntil); - } else { - message.jailedUntil = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = Boolean(object.tombstoned); - } else { - message.tombstoned = false; - } - if ( - object.missedBlocksCounter !== undefined && - object.missedBlocksCounter !== null - ) { - message.missedBlocksCounter = Number(object.missedBlocksCounter); - } else { - message.missedBlocksCounter = 0; - } - return message; - }, - - toJSON(message: ValidatorSigningInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.startHeight !== undefined && - (obj.startHeight = message.startHeight); - message.indexOffset !== undefined && - (obj.indexOffset = message.indexOffset); - message.jailedUntil !== undefined && - (obj.jailedUntil = - message.jailedUntil !== undefined - ? message.jailedUntil.toISOString() - : null); - message.tombstoned !== undefined && (obj.tombstoned = message.tombstoned); - message.missedBlocksCounter !== undefined && - (obj.missedBlocksCounter = message.missedBlocksCounter); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSigningInfo { - const message = { ...baseValidatorSigningInfo } as ValidatorSigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.startHeight !== undefined && object.startHeight !== null) { - message.startHeight = object.startHeight; - } else { - message.startHeight = 0; - } - if (object.indexOffset !== undefined && object.indexOffset !== null) { - message.indexOffset = object.indexOffset; - } else { - message.indexOffset = 0; - } - if (object.jailedUntil !== undefined && object.jailedUntil !== null) { - message.jailedUntil = object.jailedUntil; - } else { - message.jailedUntil = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = object.tombstoned; - } else { - message.tombstoned = false; - } - if ( - object.missedBlocksCounter !== undefined && - object.missedBlocksCounter !== null - ) { - message.missedBlocksCounter = object.missedBlocksCounter; - } else { - message.missedBlocksCounter = 0; - } - return message; - }, -}; - -const baseParams: object = { signedBlocksWindow: 0 }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.signedBlocksWindow !== 0) { - writer.uint32(8).int64(message.signedBlocksWindow); - } - if (message.minSignedPerWindow.length !== 0) { - writer.uint32(18).bytes(message.minSignedPerWindow); - } - if (message.downtimeJailDuration !== undefined) { - Duration.encode( - message.downtimeJailDuration, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.slashFractionDoubleSign.length !== 0) { - writer.uint32(34).bytes(message.slashFractionDoubleSign); - } - if (message.slashFractionDowntime.length !== 0) { - writer.uint32(42).bytes(message.slashFractionDowntime); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedBlocksWindow = longToNumber(reader.int64() as Long); - break; - case 2: - message.minSignedPerWindow = reader.bytes(); - break; - case 3: - message.downtimeJailDuration = Duration.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.slashFractionDoubleSign = reader.bytes(); - break; - case 5: - message.slashFractionDowntime = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.signedBlocksWindow !== undefined && - object.signedBlocksWindow !== null - ) { - message.signedBlocksWindow = Number(object.signedBlocksWindow); - } else { - message.signedBlocksWindow = 0; - } - if ( - object.minSignedPerWindow !== undefined && - object.minSignedPerWindow !== null - ) { - message.minSignedPerWindow = bytesFromBase64(object.minSignedPerWindow); - } - if ( - object.downtimeJailDuration !== undefined && - object.downtimeJailDuration !== null - ) { - message.downtimeJailDuration = Duration.fromJSON( - object.downtimeJailDuration - ); - } else { - message.downtimeJailDuration = undefined; - } - if ( - object.slashFractionDoubleSign !== undefined && - object.slashFractionDoubleSign !== null - ) { - message.slashFractionDoubleSign = bytesFromBase64( - object.slashFractionDoubleSign - ); - } - if ( - object.slashFractionDowntime !== undefined && - object.slashFractionDowntime !== null - ) { - message.slashFractionDowntime = bytesFromBase64( - object.slashFractionDowntime - ); - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.signedBlocksWindow !== undefined && - (obj.signedBlocksWindow = message.signedBlocksWindow); - message.minSignedPerWindow !== undefined && - (obj.minSignedPerWindow = base64FromBytes( - message.minSignedPerWindow !== undefined - ? message.minSignedPerWindow - : new Uint8Array() - )); - message.downtimeJailDuration !== undefined && - (obj.downtimeJailDuration = message.downtimeJailDuration - ? Duration.toJSON(message.downtimeJailDuration) - : undefined); - message.slashFractionDoubleSign !== undefined && - (obj.slashFractionDoubleSign = base64FromBytes( - message.slashFractionDoubleSign !== undefined - ? message.slashFractionDoubleSign - : new Uint8Array() - )); - message.slashFractionDowntime !== undefined && - (obj.slashFractionDowntime = base64FromBytes( - message.slashFractionDowntime !== undefined - ? message.slashFractionDowntime - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.signedBlocksWindow !== undefined && - object.signedBlocksWindow !== null - ) { - message.signedBlocksWindow = object.signedBlocksWindow; - } else { - message.signedBlocksWindow = 0; - } - if ( - object.minSignedPerWindow !== undefined && - object.minSignedPerWindow !== null - ) { - message.minSignedPerWindow = object.minSignedPerWindow; - } else { - message.minSignedPerWindow = new Uint8Array(); - } - if ( - object.downtimeJailDuration !== undefined && - object.downtimeJailDuration !== null - ) { - message.downtimeJailDuration = Duration.fromPartial( - object.downtimeJailDuration - ); - } else { - message.downtimeJailDuration = undefined; - } - if ( - object.slashFractionDoubleSign !== undefined && - object.slashFractionDoubleSign !== null - ) { - message.slashFractionDoubleSign = object.slashFractionDoubleSign; - } else { - message.slashFractionDoubleSign = new Uint8Array(); - } - if ( - object.slashFractionDowntime !== undefined && - object.slashFractionDowntime !== null - ) { - message.slashFractionDowntime = object.slashFractionDowntime; - } else { - message.slashFractionDowntime = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts deleted file mode 100644 index d33bfd7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjail { - validatorAddr: string; -} -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponse { -} -export declare const MsgUnjail: { - encode(message: MsgUnjail, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUnjail; - fromJSON(object: any): MsgUnjail; - toJSON(message: MsgUnjail): unknown; - fromPartial(object: DeepPartial): MsgUnjail; -}; -export declare const MsgUnjailResponse: { - encode(_: MsgUnjailResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUnjailResponse; - fromJSON(_: any): MsgUnjailResponse; - toJSON(_: MsgUnjailResponse): unknown; - fromPartial(_: DeepPartial): MsgUnjailResponse; -}; -/** Msg defines the slashing Msg service. */ -export interface Msg { - /** - * Unjail defines a method for unjailing a jailed validator, thus returning - * them into the bonded validator set, so they can begin receiving provisions - * and rewards again. - */ - Unjail(request: MsgUnjail): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Unjail(request: MsgUnjail): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js deleted file mode 100644 index cdb1d9d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js +++ /dev/null @@ -1,97 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseMsgUnjail = { validatorAddr: "" }; -export const MsgUnjail = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjail }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUnjail }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUnjail }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseMsgUnjailResponse = {}; -export const MsgUnjailResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjailResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgUnjailResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgUnjailResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Unjail(request) { - const data = MsgUnjail.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Msg", "Unjail", data); - return promise.then((data) => MsgUnjailResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts deleted file mode 100644 index 3906fba..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjail { - validatorAddr: string; -} - -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponse {} - -const baseMsgUnjail: object = { validatorAddr: "" }; - -export const MsgUnjail = { - encode(message: MsgUnjail, writer: Writer = Writer.create()): Writer { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUnjail { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjail } as MsgUnjail; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUnjail { - const message = { ...baseMsgUnjail } as MsgUnjail; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - return message; - }, - - toJSON(message: MsgUnjail): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUnjail { - const message = { ...baseMsgUnjail } as MsgUnjail; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - return message; - }, -}; - -const baseMsgUnjailResponse: object = {}; - -export const MsgUnjailResponse = { - encode(_: MsgUnjailResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUnjailResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjailResponse } as MsgUnjailResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUnjailResponse { - const message = { ...baseMsgUnjailResponse } as MsgUnjailResponse; - return message; - }, - - toJSON(_: MsgUnjailResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgUnjailResponse { - const message = { ...baseMsgUnjailResponse } as MsgUnjailResponse; - return message; - }, -}; - -/** Msg defines the slashing Msg service. */ -export interface Msg { - /** - * Unjail defines a method for unjailing a jailed validator, thus returning - * them into the bonded validator set, so they can begin receiving provisions - * and rewards again. - */ - Unjail(request: MsgUnjail): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Unjail(request: MsgUnjail): Promise { - const data = MsgUnjail.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Msg", - "Unjail", - data - ); - return promise.then((data) => MsgUnjailResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index b586045..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556fa..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index f67058a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 82af3da..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 52a7265..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js deleted file mode 100644 index 1b4a5ba..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js +++ /dev/null @@ -1,625 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { HistoricalInfo } from "./module/types/cosmos/staking/v1beta1/staking"; -import { CommissionRates } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Commission } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Description } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Validator } from "./module/types/cosmos/staking/v1beta1/staking"; -import { ValAddresses } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVPair } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVPairs } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVVTriplet } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVVTriplets } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Delegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { UnbondingDelegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { UnbondingDelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Redelegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Params } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationEntryResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Pool } from "./module/types/cosmos/staking/v1beta1/staking"; -import { LastValidatorPower } from "./module/types/cosmos/staking/v1beta1/genesis"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Validators: {}, - Validator: {}, - ValidatorDelegations: {}, - ValidatorUnbondingDelegations: {}, - Delegation: {}, - UnbondingDelegation: {}, - DelegatorDelegations: {}, - DelegatorUnbondingDelegations: {}, - Redelegations: {}, - DelegatorValidators: {}, - DelegatorValidator: {}, - HistoricalInfo: {}, - Pool: {}, - Params: {}, - _Structure: { - HistoricalInfo: getStructure(HistoricalInfo.fromPartial({})), - CommissionRates: getStructure(CommissionRates.fromPartial({})), - Commission: getStructure(Commission.fromPartial({})), - Description: getStructure(Description.fromPartial({})), - Validator: getStructure(Validator.fromPartial({})), - ValAddresses: getStructure(ValAddresses.fromPartial({})), - DVPair: getStructure(DVPair.fromPartial({})), - DVPairs: getStructure(DVPairs.fromPartial({})), - DVVTriplet: getStructure(DVVTriplet.fromPartial({})), - DVVTriplets: getStructure(DVVTriplets.fromPartial({})), - Delegation: getStructure(Delegation.fromPartial({})), - UnbondingDelegation: getStructure(UnbondingDelegation.fromPartial({})), - UnbondingDelegationEntry: getStructure(UnbondingDelegationEntry.fromPartial({})), - RedelegationEntry: getStructure(RedelegationEntry.fromPartial({})), - Redelegation: getStructure(Redelegation.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - DelegationResponse: getStructure(DelegationResponse.fromPartial({})), - RedelegationEntryResponse: getStructure(RedelegationEntryResponse.fromPartial({})), - RedelegationResponse: getStructure(RedelegationResponse.fromPartial({})), - Pool: getStructure(Pool.fromPartial({})), - LastValidatorPower: getStructure(LastValidatorPower.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getValidators: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Validators[JSON.stringify(params)] ?? {}; - }, - getValidator: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Validator[JSON.stringify(params)] ?? {}; - }, - getValidatorDelegations: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorDelegations[JSON.stringify(params)] ?? {}; - }, - getValidatorUnbondingDelegations: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorUnbondingDelegations[JSON.stringify(params)] ?? {}; - }, - getDelegation: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Delegation[JSON.stringify(params)] ?? {}; - }, - getUnbondingDelegation: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.UnbondingDelegation[JSON.stringify(params)] ?? {}; - }, - getDelegatorDelegations: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorDelegations[JSON.stringify(params)] ?? {}; - }, - getDelegatorUnbondingDelegations: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorUnbondingDelegations[JSON.stringify(params)] ?? {}; - }, - getRedelegations: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Redelegations[JSON.stringify(params)] ?? {}; - }, - getDelegatorValidators: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {}; - }, - getDelegatorValidator: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorValidator[JSON.stringify(params)] ?? {}; - }, - getHistoricalInfo: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.HistoricalInfo[JSON.stringify(params)] ?? {}; - }, - getPool: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Pool[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryValidators({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidators(query)).data : (await (await initQueryClient(rootGetters)).queryValidators()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryValidators({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Validators', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidators', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidators']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidators', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryValidator({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidator(key.validator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryValidator(key.validator_addr)).data; - commit('QUERY', { query: 'Validator', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidator', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidator']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidator', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryValidatorDelegations({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidatorDelegations(key.validator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryValidatorDelegations(key.validator_addr)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryValidatorDelegations(key.validator_addr, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ValidatorDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorDelegations', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryValidatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryValidatorUnbondingDelegations(key.validator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryValidatorUnbondingDelegations(key.validator_addr)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryValidatorUnbondingDelegations(key.validator_addr, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ValidatorUnbondingDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorUnbondingDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorUnbondingDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorUnbondingDelegations', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegation({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegation(key.validator_addr, key.delegator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryDelegation(key.validator_addr, key.delegator_addr)).data; - commit('QUERY', { query: 'Delegation', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegation', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegation']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegation', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryUnbondingDelegation({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryUnbondingDelegation(key.validator_addr, key.delegator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryUnbondingDelegation(key.validator_addr, key.delegator_addr)).data; - commit('QUERY', { query: 'UnbondingDelegation', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryUnbondingDelegation', payload: { options: { all }, params: { ...key }, query } }); - return getters['getUnbondingDelegation']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryUnbondingDelegation', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegatorDelegations({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegatorDelegations(key.delegator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryDelegatorDelegations(key.delegator_addr)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryDelegatorDelegations(key.delegator_addr, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'DelegatorDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorDelegations', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegatorUnbondingDelegations(key.delegator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryDelegatorUnbondingDelegations(key.delegator_addr)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryDelegatorUnbondingDelegations(key.delegator_addr, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'DelegatorUnbondingDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorUnbondingDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorUnbondingDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorUnbondingDelegations', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryRedelegations({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryRedelegations(key.delegator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryRedelegations(key.delegator_addr)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryRedelegations(key.delegator_addr, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Redelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryRedelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getRedelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryRedelegations', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegatorValidators(key.delegator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryDelegatorValidators(key.delegator_addr)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryDelegatorValidators(key.delegator_addr, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'DelegatorValidators', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorValidators']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorValidators', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDelegatorValidator({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDelegatorValidator(key.delegator_addr, key.validator_addr, query)).data : (await (await initQueryClient(rootGetters)).queryDelegatorValidator(key.delegator_addr, key.validator_addr)).data; - commit('QUERY', { query: 'DelegatorValidator', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorValidator', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorValidator']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorValidator', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryHistoricalInfo({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryHistoricalInfo(key.height, query)).data : (await (await initQueryClient(rootGetters)).queryHistoricalInfo(key.height)).data; - commit('QUERY', { query: 'HistoricalInfo', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryHistoricalInfo', payload: { options: { all }, params: { ...key }, query } }); - return getters['getHistoricalInfo']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryHistoricalInfo', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryPool({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryPool(query)).data : (await (await initQueryClient(rootGetters)).queryPool()).data; - commit('QUERY', { query: 'Pool', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPool', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPool']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryPool', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryParams(query)).data : (await (await initQueryClient(rootGetters)).queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgDelegate({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDelegate(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgDelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDelegate:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgEditValidator({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgEditValidator(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgEditValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgEditValidator:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgCreateValidator({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateValidator(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgCreateValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateValidator:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgUndelegate({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUndelegate(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUndelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUndelegate:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgBeginRedelegate({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgBeginRedelegate(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgDelegate({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDelegate(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgDelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDelegate:Create', 'Could not create message.'); - } - } - }, - async MsgEditValidator({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgEditValidator(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgEditValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgEditValidator:Create', 'Could not create message.'); - } - } - }, - async MsgCreateValidator({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateValidator(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgCreateValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateValidator:Create', 'Could not create message.'); - } - } - }, - async MsgUndelegate({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUndelegate(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUndelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUndelegate:Create', 'Could not create message.'); - } - } - }, - async MsgBeginRedelegate({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgBeginRedelegate(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts deleted file mode 100644 index 0656255..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts +++ /dev/null @@ -1,619 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { HistoricalInfo } from "./module/types/cosmos/staking/v1beta1/staking" -import { CommissionRates } from "./module/types/cosmos/staking/v1beta1/staking" -import { Commission } from "./module/types/cosmos/staking/v1beta1/staking" -import { Description } from "./module/types/cosmos/staking/v1beta1/staking" -import { Validator } from "./module/types/cosmos/staking/v1beta1/staking" -import { ValAddresses } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVPair } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVPairs } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVVTriplet } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVVTriplets } from "./module/types/cosmos/staking/v1beta1/staking" -import { Delegation } from "./module/types/cosmos/staking/v1beta1/staking" -import { UnbondingDelegation } from "./module/types/cosmos/staking/v1beta1/staking" -import { UnbondingDelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking" -import { RedelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking" -import { Redelegation } from "./module/types/cosmos/staking/v1beta1/staking" -import { Params } from "./module/types/cosmos/staking/v1beta1/staking" -import { DelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking" -import { RedelegationEntryResponse } from "./module/types/cosmos/staking/v1beta1/staking" -import { RedelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking" -import { Pool } from "./module/types/cosmos/staking/v1beta1/staking" -import { LastValidatorPower } from "./module/types/cosmos/staking/v1beta1/genesis" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Validators: {}, - Validator: {}, - ValidatorDelegations: {}, - ValidatorUnbondingDelegations: {}, - Delegation: {}, - UnbondingDelegation: {}, - DelegatorDelegations: {}, - DelegatorUnbondingDelegations: {}, - Redelegations: {}, - DelegatorValidators: {}, - DelegatorValidator: {}, - HistoricalInfo: {}, - Pool: {}, - Params: {}, - - _Structure: { - HistoricalInfo: getStructure(HistoricalInfo.fromPartial({})), - CommissionRates: getStructure(CommissionRates.fromPartial({})), - Commission: getStructure(Commission.fromPartial({})), - Description: getStructure(Description.fromPartial({})), - Validator: getStructure(Validator.fromPartial({})), - ValAddresses: getStructure(ValAddresses.fromPartial({})), - DVPair: getStructure(DVPair.fromPartial({})), - DVPairs: getStructure(DVPairs.fromPartial({})), - DVVTriplet: getStructure(DVVTriplet.fromPartial({})), - DVVTriplets: getStructure(DVVTriplets.fromPartial({})), - Delegation: getStructure(Delegation.fromPartial({})), - UnbondingDelegation: getStructure(UnbondingDelegation.fromPartial({})), - UnbondingDelegationEntry: getStructure(UnbondingDelegationEntry.fromPartial({})), - RedelegationEntry: getStructure(RedelegationEntry.fromPartial({})), - Redelegation: getStructure(Redelegation.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - DelegationResponse: getStructure(DelegationResponse.fromPartial({})), - RedelegationEntryResponse: getStructure(RedelegationEntryResponse.fromPartial({})), - RedelegationResponse: getStructure(RedelegationResponse.fromPartial({})), - Pool: getStructure(Pool.fromPartial({})), - LastValidatorPower: getStructure(LastValidatorPower.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getValidators: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Validators[JSON.stringify(params)] ?? {} - }, - getValidator: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Validator[JSON.stringify(params)] ?? {} - }, - getValidatorDelegations: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorDelegations[JSON.stringify(params)] ?? {} - }, - getValidatorUnbondingDelegations: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorUnbondingDelegations[JSON.stringify(params)] ?? {} - }, - getDelegation: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Delegation[JSON.stringify(params)] ?? {} - }, - getUnbondingDelegation: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.UnbondingDelegation[JSON.stringify(params)] ?? {} - }, - getDelegatorDelegations: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorDelegations[JSON.stringify(params)] ?? {} - }, - getDelegatorUnbondingDelegations: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorUnbondingDelegations[JSON.stringify(params)] ?? {} - }, - getRedelegations: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Redelegations[JSON.stringify(params)] ?? {} - }, - getDelegatorValidators: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {} - }, - getDelegatorValidator: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorValidator[JSON.stringify(params)] ?? {} - }, - getHistoricalInfo: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.HistoricalInfo[JSON.stringify(params)] ?? {} - }, - getPool: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Pool[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryValidators({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidators( query)).data:(await (await initQueryClient(rootGetters)).queryValidators()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryValidators({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Validators', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidators', payload: { options: { all }, params: {...key},query }}) - return getters['getValidators']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidators', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryValidator({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidator( key.validator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryValidator( key.validator_addr )).data - - commit('QUERY', { query: 'Validator', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidator', payload: { options: { all }, params: {...key},query }}) - return getters['getValidator']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidator', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryValidatorDelegations({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidatorDelegations( key.validator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryValidatorDelegations( key.validator_addr )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryValidatorDelegations( key.validator_addr, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ValidatorDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorDelegations', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryValidatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryValidatorUnbondingDelegations( key.validator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryValidatorUnbondingDelegations( key.validator_addr )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryValidatorUnbondingDelegations( key.validator_addr, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ValidatorUnbondingDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorUnbondingDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorUnbondingDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryValidatorUnbondingDelegations', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegation({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegation( key.validator_addr, key.delegator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryDelegation( key.validator_addr , key.delegator_addr )).data - - commit('QUERY', { query: 'Delegation', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegation', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegation']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegation', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryUnbondingDelegation({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryUnbondingDelegation( key.validator_addr, key.delegator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryUnbondingDelegation( key.validator_addr , key.delegator_addr )).data - - commit('QUERY', { query: 'UnbondingDelegation', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUnbondingDelegation', payload: { options: { all }, params: {...key},query }}) - return getters['getUnbondingDelegation']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryUnbondingDelegation', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegatorDelegations({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegatorDelegations( key.delegator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryDelegatorDelegations( key.delegator_addr )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryDelegatorDelegations( key.delegator_addr, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'DelegatorDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorDelegations', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegatorUnbondingDelegations( key.delegator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryDelegatorUnbondingDelegations( key.delegator_addr )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryDelegatorUnbondingDelegations( key.delegator_addr, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'DelegatorUnbondingDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorUnbondingDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorUnbondingDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorUnbondingDelegations', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryRedelegations({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryRedelegations( key.delegator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryRedelegations( key.delegator_addr )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryRedelegations( key.delegator_addr, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Redelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryRedelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getRedelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryRedelegations', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegatorValidators( key.delegator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryDelegatorValidators( key.delegator_addr )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryDelegatorValidators( key.delegator_addr, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'DelegatorValidators', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorValidators']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorValidators', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDelegatorValidator({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDelegatorValidator( key.delegator_addr, key.validator_addr, query)).data:(await (await initQueryClient(rootGetters)).queryDelegatorValidator( key.delegator_addr , key.validator_addr )).data - - commit('QUERY', { query: 'DelegatorValidator', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorValidator', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorValidator']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDelegatorValidator', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryHistoricalInfo({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryHistoricalInfo( key.height, query)).data:(await (await initQueryClient(rootGetters)).queryHistoricalInfo( key.height )).data - - commit('QUERY', { query: 'HistoricalInfo', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryHistoricalInfo', payload: { options: { all }, params: {...key},query }}) - return getters['getHistoricalInfo']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryHistoricalInfo', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryPool({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryPool( query)).data:(await (await initQueryClient(rootGetters)).queryPool()).data - - commit('QUERY', { query: 'Pool', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPool', payload: { options: { all }, params: {...key},query }}) - return getters['getPool']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryPool', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryParams( query)).data:(await (await initQueryClient(rootGetters)).queryParams()).data - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgDelegate({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDelegate(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgDelegate:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgDelegate:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgEditValidator({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgEditValidator(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgEditValidator:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgEditValidator:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgCreateValidator({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateValidator(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgCreateValidator:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgCreateValidator:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgUndelegate({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUndelegate(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUndelegate:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUndelegate:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgBeginRedelegate({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgBeginRedelegate(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgBeginRedelegate:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgDelegate({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgDelegate(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgDelegate:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgDelegate:Create', 'Could not create message.') - } - } - }, - async MsgEditValidator({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgEditValidator(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgEditValidator:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgEditValidator:Create', 'Could not create message.') - } - } - }, - async MsgCreateValidator({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateValidator(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgCreateValidator:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgCreateValidator:Create', 'Could not create message.') - } - } - }, - async MsgUndelegate({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUndelegate(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUndelegate:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUndelegate:Create', 'Could not create message.') - } - } - }, - async MsgBeginRedelegate({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgBeginRedelegate(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgBeginRedelegate:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts deleted file mode 100644 index 29652a3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgDelegate: (data: MsgDelegate) => EncodeObject; - msgEditValidator: (data: MsgEditValidator) => EncodeObject; - msgCreateValidator: (data: MsgCreateValidator) => EncodeObject; - msgUndelegate: (data: MsgUndelegate) => EncodeObject; - msgBeginRedelegate: (data: MsgBeginRedelegate) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js deleted file mode 100644 index 23404b0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js +++ /dev/null @@ -1,39 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; -const types = [ - ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], - ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], - ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], - ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], - ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgDelegate: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: data }), - msgEditValidator: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: data }), - msgCreateValidator: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: data }), - msgUndelegate: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: data }), - msgBeginRedelegate: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts deleted file mode 100644 index 7d3d3b6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts +++ /dev/null @@ -1,67 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; - - -const types = [ - ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], - ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], - ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], - ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], - ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgDelegate: (data: MsgDelegate): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: data }), - msgEditValidator: (data: MsgEditValidator): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: data }), - msgCreateValidator: (data: MsgCreateValidator): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: data }), - msgUndelegate: (data: MsgUndelegate): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: data }), - msgBeginRedelegate: (data: MsgBeginRedelegate): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts deleted file mode 100644 index 6d18488..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,857 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Validator defines a validator, together with the total amount of the -Validator's bond shares and their exchange rate to coins. Slashing results in -a decrease in the exchange rate, allowing correct calculation of future -undelegations without iterating over delegators. When coins are delegated to -this validator, the validator is credited with a delegation whose number of -bond shares is based on the amount of coins delegated divided by the current -exchange rate. Voting power can be calculated as total bonded shares -multiplied by exchange rate. -*/ -export interface Stakingv1Beta1Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress?: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey?: ProtobufAny; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed?: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status?: V1Beta1BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens?: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares?: string; - /** description defines the description terms for the validator. */ - description?: V1Beta1Description; - /** - * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - * @format int64 - */ - unbondingHeight?: string; - /** - * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - * @format date-time - */ - unbondingTime?: string; - /** commission defines the commission parameters. */ - commission?: V1Beta1Commission; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation?: string; -} -export interface TypesBlockID { - /** @format byte */ - hash?: string; - partSetHeader?: TypesPartSetHeader; -} -/** - * Header defines the structure of a Tendermint block header. - */ -export interface TypesHeader { - /** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ - version?: VersionConsensus; - chainId?: string; - /** @format int64 */ - height?: string; - /** @format date-time */ - time?: string; - lastBlockId?: TypesBlockID; - /** @format byte */ - lastCommitHash?: string; - /** @format byte */ - dataHash?: string; - /** @format byte */ - validatorsHash?: string; - /** @format byte */ - nextValidatorsHash?: string; - /** @format byte */ - consensusHash?: string; - /** @format byte */ - appHash?: string; - /** @format byte */ - lastResultsHash?: string; - /** @format byte */ - evidenceHash?: string; - /** @format byte */ - proposerAddress?: string; -} -export interface TypesPartSetHeader { - /** @format int64 */ - total?: number; - /** @format byte */ - hash?: string; -} -/** -* BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. -*/ -export declare enum V1Beta1BondStatus { - BOND_STATUS_UNSPECIFIED = "BOND_STATUS_UNSPECIFIED", - BOND_STATUS_UNBONDED = "BOND_STATUS_UNBONDED", - BOND_STATUS_UNBONDING = "BOND_STATUS_UNBONDING", - BOND_STATUS_BONDED = "BOND_STATUS_BONDED" -} -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** - * Commission defines commission parameters for a given validator. - */ -export interface V1Beta1Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates?: V1Beta1CommissionRates; - /** - * update_time is the last time the commission rate was changed. - * @format date-time - */ - updateTime?: string; -} -/** -* CommissionRates defines the initial commission rates to be used for creating -a validator. -*/ -export interface V1Beta1CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate?: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate?: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate?: string; -} -/** -* Delegation represents the bond with tokens held by an account. It is -owned by one delegator, and is associated with the voting power of one -validator. -*/ -export interface V1Beta1Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress?: string; - /** shares define the delegation shares received. */ - shares?: string; -} -/** -* DelegationResponse is equivalent to Delegation except that it contains a -balance in addition to shares which is more suitable for client responses. -*/ -export interface V1Beta1DelegationResponse { - /** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ - delegation?: V1Beta1Delegation; - /** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ - balance?: V1Beta1Coin; -} -/** - * Description defines a validator description. - */ -export interface V1Beta1Description { - /** moniker defines a human-readable name for the validator. */ - moniker?: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity?: string; - /** website defines an optional website link. */ - website?: string; - /** security_contact defines an optional email for security contact. */ - securityContact?: string; - /** details define other optional details. */ - details?: string; -} -/** -* HistoricalInfo contains header and validator information for a given block. -It is stored as part of staking module's state, which persists the `n` most -recent HistoricalInfo -(`n` is set by the staking module's `historical_entries` parameter). -*/ -export interface V1Beta1HistoricalInfo { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - valset?: Stakingv1Beta1Validator[]; -} -/** - * MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. - */ -export interface V1Beta1MsgBeginRedelegateResponse { - /** @format date-time */ - completionTime?: string; -} -/** - * MsgCreateValidatorResponse defines the Msg/CreateValidator response type. - */ -export declare type V1Beta1MsgCreateValidatorResponse = object; -/** - * MsgDelegateResponse defines the Msg/Delegate response type. - */ -export declare type V1Beta1MsgDelegateResponse = object; -/** - * MsgEditValidatorResponse defines the Msg/EditValidator response type. - */ -export declare type V1Beta1MsgEditValidatorResponse = object; -/** - * MsgUndelegateResponse defines the Msg/Undelegate response type. - */ -export interface V1Beta1MsgUndelegateResponse { - /** @format date-time */ - completionTime?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params defines the parameters for the staking module. - */ -export interface V1Beta1Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime?: string; - /** - * max_validators is the maximum number of validators. - * @format int64 - */ - maxValidators?: number; - /** - * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - * @format int64 - */ - maxEntries?: number; - /** - * historical_entries is the number of historical entries to persist. - * @format int64 - */ - historicalEntries?: number; - /** bond_denom defines the bondable coin denomination. */ - bondDenom?: string; -} -/** -* Pool is used for tracking bonded and not-bonded token supply of the bond -denomination. -*/ -export interface V1Beta1Pool { - notBondedTokens?: string; - bondedTokens?: string; -} -/** - * QueryDelegationResponse is response type for the Query/Delegation RPC method. - */ -export interface V1Beta1QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse?: V1Beta1DelegationResponse; -} -/** -* QueryDelegatorDelegationsResponse is response type for the -Query/DelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses?: V1Beta1DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryUnbondingDelegatorDelegationsResponse is response type for the -Query/UnbondingDelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses?: V1Beta1UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryDelegatorValidatorResponse response type for the -Query/DelegatorValidator RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} -/** -* QueryDelegatorValidatorsResponse is response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators?: Stakingv1Beta1Validator[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -method. -*/ -export interface V1Beta1QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist?: V1Beta1HistoricalInfo; -} -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: V1Beta1Params; -} -/** - * QueryPoolResponse is response type for the Query/Pool RPC method. - */ -export interface V1Beta1QueryPoolResponse { - /** pool defines the pool info. */ - pool?: V1Beta1Pool; -} -/** -* QueryRedelegationsResponse is response type for the Query/Redelegations RPC -method. -*/ -export interface V1Beta1QueryRedelegationsResponse { - redelegationResponses?: V1Beta1RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryDelegationResponse is response type for the Query/UnbondingDelegation -RPC method. -*/ -export interface V1Beta1QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond?: V1Beta1UnbondingDelegation; -} -export interface V1Beta1QueryValidatorDelegationsResponse { - delegationResponses?: V1Beta1DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1Beta1QueryValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} -/** -* QueryValidatorUnbondingDelegationsResponse is response type for the -Query/ValidatorUnbondingDelegations RPC method. -*/ -export interface V1Beta1QueryValidatorUnbondingDelegationsResponse { - unbondingResponses?: V1Beta1UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1Beta1QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators?: Stakingv1Beta1Validator[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* Redelegation contains the list of a particular delegator's redelegating bonds -from a particular source validator to a particular destination validator. -*/ -export interface V1Beta1Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress?: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress?: string; - /** entries are the redelegation entries. */ - entries?: V1Beta1RedelegationEntry[]; -} -/** - * RedelegationEntry defines a redelegation object with relevant metadata. - */ -export interface V1Beta1RedelegationEntry { - /** - * creation_height defines the height which the redelegation took place. - * @format int64 - */ - creationHeight?: string; - /** - * completion_time defines the unix time for redelegation completion. - * @format date-time - */ - completionTime?: string; - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance?: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst?: string; -} -/** -* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -contains a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationEntryResponse { - /** RedelegationEntry defines a redelegation object with relevant metadata. */ - redelegationEntry?: V1Beta1RedelegationEntry; - balance?: string; -} -/** -* RedelegationResponse is equivalent to a Redelegation except that its entries -contain a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationResponse { - /** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ - redelegation?: V1Beta1Redelegation; - entries?: V1Beta1RedelegationEntryResponse[]; -} -/** -* UnbondingDelegation stores all of a single delegator's unbonding bonds -for a single validator in an time-ordered list. -*/ -export interface V1Beta1UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress?: string; - /** entries are the unbonding delegation entries. */ - entries?: V1Beta1UnbondingDelegationEntry[]; -} -/** - * UnbondingDelegationEntry defines an unbonding object with relevant metadata. - */ -export interface V1Beta1UnbondingDelegationEntry { - /** - * creation_height is the height which the unbonding took place. - * @format int64 - */ - creationHeight?: string; - /** - * completion_time is the unix time for unbonding completion. - * @format date-time - */ - completionTime?: string; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance?: string; - /** balance defines the tokens to receive at completion. */ - balance?: string; -} -/** -* Consensus captures the consensus rules for processing a block in the blockchain, -including all blockchain data structures and the rules of the application's -state transition machine. -*/ -export interface VersionConsensus { - /** @format uint64 */ - block?: string; - /** @format uint64 */ - app?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/staking/v1beta1/staking.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegatorAddr} - */ - queryDelegatorDelegations: (delegatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryRedelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations - */ - queryRedelegations: (delegatorAddr: string, query?: { - srcValidatorAddr?: string; - dstValidatorAddr?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given - delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations - */ - queryDelegatorUnbondingDelegations: (delegatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator - address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators - */ - queryDelegatorValidators: (delegatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator - pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr} - */ - queryDelegatorValidator: (delegatorAddr: string, validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryHistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - queryHistoricalInfo: (height: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - queryPool: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - queryValidators: (query?: { - status?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr} - */ - queryValidator: (validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations - */ - queryValidatorDelegations: (validatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr} - */ - queryDelegation: (validatorAddr: string, delegatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryUnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator - pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation - */ - queryUnbondingDelegation: (validatorAddr: string, delegatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations - */ - queryValidatorUnbondingDelegations: (validatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js deleted file mode 100644 index 52ec2e3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js +++ /dev/null @@ -1,362 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. -*/ -export var V1Beta1BondStatus; -(function (V1Beta1BondStatus) { - V1Beta1BondStatus["BOND_STATUS_UNSPECIFIED"] = "BOND_STATUS_UNSPECIFIED"; - V1Beta1BondStatus["BOND_STATUS_UNBONDED"] = "BOND_STATUS_UNBONDED"; - V1Beta1BondStatus["BOND_STATUS_UNBONDING"] = "BOND_STATUS_UNBONDING"; - V1Beta1BondStatus["BOND_STATUS_BONDED"] = "BOND_STATUS_BONDED"; -})(V1Beta1BondStatus || (V1Beta1BondStatus = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/staking/v1beta1/staking.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryDelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegatorAddr} - */ - this.queryDelegatorDelegations = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryRedelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations - */ - this.queryRedelegations = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given - delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations - */ - this.queryDelegatorUnbondingDelegations = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator - address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators - */ - this.queryDelegatorValidators = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator - pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr} - */ - this.queryDelegatorValidator = (delegatorAddr, validatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryHistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - this.queryHistoricalInfo = (height, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/historical_info/${height}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - this.queryPool = (params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/pool`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - this.queryValidators = (query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr} - */ - this.queryValidator = (validatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations - */ - this.queryValidatorDelegations = (validatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr} - */ - this.queryDelegation = (validatorAddr, delegatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryUnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator - pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation - */ - this.queryUnbondingDelegation = (validatorAddr, delegatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations - */ - this.queryValidatorUnbondingDelegations = (validatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts deleted file mode 100644 index 972f2fe..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts +++ /dev/null @@ -1,1240 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Validator defines a validator, together with the total amount of the -Validator's bond shares and their exchange rate to coins. Slashing results in -a decrease in the exchange rate, allowing correct calculation of future -undelegations without iterating over delegators. When coins are delegated to -this validator, the validator is credited with a delegation whose number of -bond shares is based on the amount of coins delegated divided by the current -exchange rate. Voting power can be calculated as total bonded shares -multiplied by exchange rate. -*/ -export interface Stakingv1Beta1Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress?: string; - - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey?: ProtobufAny; - - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed?: boolean; - - /** status is the validator status (bonded/unbonding/unbonded). */ - status?: V1Beta1BondStatus; - - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens?: string; - - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares?: string; - - /** description defines the description terms for the validator. */ - description?: V1Beta1Description; - - /** - * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - * @format int64 - */ - unbondingHeight?: string; - - /** - * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - * @format date-time - */ - unbondingTime?: string; - - /** commission defines the commission parameters. */ - commission?: V1Beta1Commission; - - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation?: string; -} - -export interface TypesBlockID { - /** @format byte */ - hash?: string; - partSetHeader?: TypesPartSetHeader; -} - -/** - * Header defines the structure of a Tendermint block header. - */ -export interface TypesHeader { - /** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ - version?: VersionConsensus; - chainId?: string; - - /** @format int64 */ - height?: string; - - /** @format date-time */ - time?: string; - lastBlockId?: TypesBlockID; - - /** @format byte */ - lastCommitHash?: string; - - /** @format byte */ - dataHash?: string; - - /** @format byte */ - validatorsHash?: string; - - /** @format byte */ - nextValidatorsHash?: string; - - /** @format byte */ - consensusHash?: string; - - /** @format byte */ - appHash?: string; - - /** @format byte */ - lastResultsHash?: string; - - /** @format byte */ - evidenceHash?: string; - - /** @format byte */ - proposerAddress?: string; -} - -export interface TypesPartSetHeader { - /** @format int64 */ - total?: number; - - /** @format byte */ - hash?: string; -} - -/** -* BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. -*/ -export enum V1Beta1BondStatus { - BOND_STATUS_UNSPECIFIED = "BOND_STATUS_UNSPECIFIED", - BOND_STATUS_UNBONDED = "BOND_STATUS_UNBONDED", - BOND_STATUS_UNBONDING = "BOND_STATUS_UNBONDING", - BOND_STATUS_BONDED = "BOND_STATUS_BONDED", -} - -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** - * Commission defines commission parameters for a given validator. - */ -export interface V1Beta1Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates?: V1Beta1CommissionRates; - - /** - * update_time is the last time the commission rate was changed. - * @format date-time - */ - updateTime?: string; -} - -/** -* CommissionRates defines the initial commission rates to be used for creating -a validator. -*/ -export interface V1Beta1CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate?: string; - - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate?: string; - - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate?: string; -} - -/** -* Delegation represents the bond with tokens held by an account. It is -owned by one delegator, and is associated with the voting power of one -validator. -*/ -export interface V1Beta1Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress?: string; - - /** shares define the delegation shares received. */ - shares?: string; -} - -/** -* DelegationResponse is equivalent to Delegation except that it contains a -balance in addition to shares which is more suitable for client responses. -*/ -export interface V1Beta1DelegationResponse { - /** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ - delegation?: V1Beta1Delegation; - - /** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ - balance?: V1Beta1Coin; -} - -/** - * Description defines a validator description. - */ -export interface V1Beta1Description { - /** moniker defines a human-readable name for the validator. */ - moniker?: string; - - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity?: string; - - /** website defines an optional website link. */ - website?: string; - - /** security_contact defines an optional email for security contact. */ - securityContact?: string; - - /** details define other optional details. */ - details?: string; -} - -/** -* HistoricalInfo contains header and validator information for a given block. -It is stored as part of staking module's state, which persists the `n` most -recent HistoricalInfo -(`n` is set by the staking module's `historical_entries` parameter). -*/ -export interface V1Beta1HistoricalInfo { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - valset?: Stakingv1Beta1Validator[]; -} - -/** - * MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. - */ -export interface V1Beta1MsgBeginRedelegateResponse { - /** @format date-time */ - completionTime?: string; -} - -/** - * MsgCreateValidatorResponse defines the Msg/CreateValidator response type. - */ -export type V1Beta1MsgCreateValidatorResponse = object; - -/** - * MsgDelegateResponse defines the Msg/Delegate response type. - */ -export type V1Beta1MsgDelegateResponse = object; - -/** - * MsgEditValidatorResponse defines the Msg/EditValidator response type. - */ -export type V1Beta1MsgEditValidatorResponse = object; - -/** - * MsgUndelegateResponse defines the Msg/Undelegate response type. - */ -export interface V1Beta1MsgUndelegateResponse { - /** @format date-time */ - completionTime?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the parameters for the staking module. - */ -export interface V1Beta1Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime?: string; - - /** - * max_validators is the maximum number of validators. - * @format int64 - */ - maxValidators?: number; - - /** - * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - * @format int64 - */ - maxEntries?: number; - - /** - * historical_entries is the number of historical entries to persist. - * @format int64 - */ - historicalEntries?: number; - - /** bond_denom defines the bondable coin denomination. */ - bondDenom?: string; -} - -/** -* Pool is used for tracking bonded and not-bonded token supply of the bond -denomination. -*/ -export interface V1Beta1Pool { - notBondedTokens?: string; - bondedTokens?: string; -} - -/** - * QueryDelegationResponse is response type for the Query/Delegation RPC method. - */ -export interface V1Beta1QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse?: V1Beta1DelegationResponse; -} - -/** -* QueryDelegatorDelegationsResponse is response type for the -Query/DelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses?: V1Beta1DelegationResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryUnbondingDelegatorDelegationsResponse is response type for the -Query/UnbondingDelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses?: V1Beta1UnbondingDelegation[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryDelegatorValidatorResponse response type for the -Query/DelegatorValidator RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} - -/** -* QueryDelegatorValidatorsResponse is response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators?: Stakingv1Beta1Validator[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -method. -*/ -export interface V1Beta1QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist?: V1Beta1HistoricalInfo; -} - -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: V1Beta1Params; -} - -/** - * QueryPoolResponse is response type for the Query/Pool RPC method. - */ -export interface V1Beta1QueryPoolResponse { - /** pool defines the pool info. */ - pool?: V1Beta1Pool; -} - -/** -* QueryRedelegationsResponse is response type for the Query/Redelegations RPC -method. -*/ -export interface V1Beta1QueryRedelegationsResponse { - redelegationResponses?: V1Beta1RedelegationResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryDelegationResponse is response type for the Query/UnbondingDelegation -RPC method. -*/ -export interface V1Beta1QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond?: V1Beta1UnbondingDelegation; -} - -export interface V1Beta1QueryValidatorDelegationsResponse { - delegationResponses?: V1Beta1DelegationResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1Beta1QueryValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} - -/** -* QueryValidatorUnbondingDelegationsResponse is response type for the -Query/ValidatorUnbondingDelegations RPC method. -*/ -export interface V1Beta1QueryValidatorUnbondingDelegationsResponse { - unbondingResponses?: V1Beta1UnbondingDelegation[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1Beta1QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators?: Stakingv1Beta1Validator[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* Redelegation contains the list of a particular delegator's redelegating bonds -from a particular source validator to a particular destination validator. -*/ -export interface V1Beta1Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress?: string; - - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress?: string; - - /** entries are the redelegation entries. */ - entries?: V1Beta1RedelegationEntry[]; -} - -/** - * RedelegationEntry defines a redelegation object with relevant metadata. - */ -export interface V1Beta1RedelegationEntry { - /** - * creation_height defines the height which the redelegation took place. - * @format int64 - */ - creationHeight?: string; - - /** - * completion_time defines the unix time for redelegation completion. - * @format date-time - */ - completionTime?: string; - - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance?: string; - - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst?: string; -} - -/** -* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -contains a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationEntryResponse { - /** RedelegationEntry defines a redelegation object with relevant metadata. */ - redelegationEntry?: V1Beta1RedelegationEntry; - balance?: string; -} - -/** -* RedelegationResponse is equivalent to a Redelegation except that its entries -contain a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationResponse { - /** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ - redelegation?: V1Beta1Redelegation; - entries?: V1Beta1RedelegationEntryResponse[]; -} - -/** -* UnbondingDelegation stores all of a single delegator's unbonding bonds -for a single validator in an time-ordered list. -*/ -export interface V1Beta1UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress?: string; - - /** entries are the unbonding delegation entries. */ - entries?: V1Beta1UnbondingDelegationEntry[]; -} - -/** - * UnbondingDelegationEntry defines an unbonding object with relevant metadata. - */ -export interface V1Beta1UnbondingDelegationEntry { - /** - * creation_height is the height which the unbonding took place. - * @format int64 - */ - creationHeight?: string; - - /** - * completion_time is the unix time for unbonding completion. - * @format date-time - */ - completionTime?: string; - - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance?: string; - - /** balance defines the tokens to receive at completion. */ - balance?: string; -} - -/** -* Consensus captures the consensus rules for processing a block in the blockchain, -including all blockchain data structures and the rules of the application's -state transition machine. -*/ -export interface VersionConsensus { - /** @format uint64 */ - block?: string; - - /** @format uint64 */ - app?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/staking/v1beta1/staking.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegatorAddr} - */ - queryDelegatorDelegations = ( - delegatorAddr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryRedelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations - */ - queryRedelegations = ( - delegatorAddr: string, - query?: { - srcValidatorAddr?: string; - dstValidatorAddr?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given -delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations - */ - queryDelegatorUnbondingDelegations = ( - delegatorAddr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator -address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators - */ - queryDelegatorValidators = ( - delegatorAddr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator -pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr} - */ - queryDelegatorValidator = (delegatorAddr: string, validatorAddr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryHistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - queryHistoricalInfo = (height: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/historical_info/${height}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - queryPool = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/pool`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - queryValidators = ( - query?: { - status?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr} - */ - queryValidator = (validatorAddr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations - */ - queryValidatorDelegations = ( - validatorAddr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr} - */ - queryDelegation = (validatorAddr: string, delegatorAddr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator -pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation - */ - queryUnbondingDelegation = (validatorAddr: string, delegatorAddr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations - */ - queryValidatorUnbondingDelegations = ( - validatorAddr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts deleted file mode 100644 index 060b7f5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "../../../cosmos/staking/v1beta1/staking"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * last_total_power tracks the total amounts of bonded tokens recorded during - * the previous end block. - */ - lastTotalPower: Uint8Array; - /** - * last_validator_powers is a special index that provides a historical list - * of the last-block's bonded validators. - */ - lastValidatorPowers: LastValidatorPower[]; - /** delegations defines the validator set at genesis. */ - validators: Validator[]; - /** delegations defines the delegations active at genesis. */ - delegations: Delegation[]; - /** unbonding_delegations defines the unbonding delegations active at genesis. */ - unbondingDelegations: UnbondingDelegation[]; - /** redelegations defines the redelegations active at genesis. */ - redelegations: Redelegation[]; - exported: boolean; -} -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPower { - /** address is the address of the validator. */ - address: string; - /** power defines the power of the validator. */ - power: number; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const LastValidatorPower: { - encode(message: LastValidatorPower, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LastValidatorPower; - fromJSON(object: any): LastValidatorPower; - toJSON(message: LastValidatorPower): unknown; - fromPartial(object: DeepPartial): LastValidatorPower; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js deleted file mode 100644 index 5899507..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js +++ /dev/null @@ -1,334 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params, Validator, Delegation, UnbondingDelegation, Redelegation, } from "../../../cosmos/staking/v1beta1/staking"; -export const protobufPackage = "cosmos.staking.v1beta1"; -const baseGenesisState = { exported: false }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.lastTotalPower.length !== 0) { - writer.uint32(18).bytes(message.lastTotalPower); - } - for (const v of message.lastValidatorPowers) { - LastValidatorPower.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - Validator.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.delegations) { - Delegation.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.unbondingDelegations) { - UnbondingDelegation.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.redelegations) { - Redelegation.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.exported === true) { - writer.uint32(64).bool(message.exported); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.lastTotalPower = reader.bytes(); - break; - case 3: - message.lastValidatorPowers.push(LastValidatorPower.decode(reader, reader.uint32())); - break; - case 4: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 5: - message.delegations.push(Delegation.decode(reader, reader.uint32())); - break; - case 6: - message.unbondingDelegations.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 7: - message.redelegations.push(Redelegation.decode(reader, reader.uint32())); - break; - case 8: - message.exported = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.lastTotalPower !== undefined && object.lastTotalPower !== null) { - message.lastTotalPower = bytesFromBase64(object.lastTotalPower); - } - if (object.lastValidatorPowers !== undefined && - object.lastValidatorPowers !== null) { - for (const e of object.lastValidatorPowers) { - message.lastValidatorPowers.push(LastValidatorPower.fromJSON(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromJSON(e)); - } - } - if (object.unbondingDelegations !== undefined && - object.unbondingDelegations !== null) { - for (const e of object.unbondingDelegations) { - message.unbondingDelegations.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromJSON(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = Boolean(object.exported); - } - else { - message.exported = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.lastTotalPower !== undefined && - (obj.lastTotalPower = base64FromBytes(message.lastTotalPower !== undefined - ? message.lastTotalPower - : new Uint8Array())); - if (message.lastValidatorPowers) { - obj.lastValidatorPowers = message.lastValidatorPowers.map((e) => e ? LastValidatorPower.toJSON(e) : undefined); - } - else { - obj.lastValidatorPowers = []; - } - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map((e) => e ? Delegation.toJSON(e) : undefined); - } - else { - obj.delegations = []; - } - if (message.unbondingDelegations) { - obj.unbondingDelegations = message.unbondingDelegations.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined); - } - else { - obj.unbondingDelegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map((e) => e ? Redelegation.toJSON(e) : undefined); - } - else { - obj.redelegations = []; - } - message.exported !== undefined && (obj.exported = message.exported); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.lastTotalPower !== undefined && object.lastTotalPower !== null) { - message.lastTotalPower = object.lastTotalPower; - } - else { - message.lastTotalPower = new Uint8Array(); - } - if (object.lastValidatorPowers !== undefined && - object.lastValidatorPowers !== null) { - for (const e of object.lastValidatorPowers) { - message.lastValidatorPowers.push(LastValidatorPower.fromPartial(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromPartial(e)); - } - } - if (object.unbondingDelegations !== undefined && - object.unbondingDelegations !== null) { - for (const e of object.unbondingDelegations) { - message.unbondingDelegations.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromPartial(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = object.exported; - } - else { - message.exported = false; - } - return message; - }, -}; -const baseLastValidatorPower = { address: "", power: 0 }; -export const LastValidatorPower = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastValidatorPower }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.power = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLastValidatorPower }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - fromPartial(object) { - const message = { ...baseLastValidatorPower }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts deleted file mode 100644 index 04cb531..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts +++ /dev/null @@ -1,417 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Params, - Validator, - Delegation, - UnbondingDelegation, - Redelegation, -} from "../../../cosmos/staking/v1beta1/staking"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * last_total_power tracks the total amounts of bonded tokens recorded during - * the previous end block. - */ - lastTotalPower: Uint8Array; - /** - * last_validator_powers is a special index that provides a historical list - * of the last-block's bonded validators. - */ - lastValidatorPowers: LastValidatorPower[]; - /** delegations defines the validator set at genesis. */ - validators: Validator[]; - /** delegations defines the delegations active at genesis. */ - delegations: Delegation[]; - /** unbonding_delegations defines the unbonding delegations active at genesis. */ - unbondingDelegations: UnbondingDelegation[]; - /** redelegations defines the redelegations active at genesis. */ - redelegations: Redelegation[]; - exported: boolean; -} - -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPower { - /** address is the address of the validator. */ - address: string; - /** power defines the power of the validator. */ - power: number; -} - -const baseGenesisState: object = { exported: false }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.lastTotalPower.length !== 0) { - writer.uint32(18).bytes(message.lastTotalPower); - } - for (const v of message.lastValidatorPowers) { - LastValidatorPower.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.delegations) { - Delegation.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.unbondingDelegations) { - UnbondingDelegation.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.redelegations) { - Redelegation.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.exported === true) { - writer.uint32(64).bool(message.exported); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.lastTotalPower = reader.bytes(); - break; - case 3: - message.lastValidatorPowers.push( - LastValidatorPower.decode(reader, reader.uint32()) - ); - break; - case 4: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 5: - message.delegations.push(Delegation.decode(reader, reader.uint32())); - break; - case 6: - message.unbondingDelegations.push( - UnbondingDelegation.decode(reader, reader.uint32()) - ); - break; - case 7: - message.redelegations.push( - Redelegation.decode(reader, reader.uint32()) - ); - break; - case 8: - message.exported = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.lastTotalPower !== undefined && object.lastTotalPower !== null) { - message.lastTotalPower = bytesFromBase64(object.lastTotalPower); - } - if ( - object.lastValidatorPowers !== undefined && - object.lastValidatorPowers !== null - ) { - for (const e of object.lastValidatorPowers) { - message.lastValidatorPowers.push(LastValidatorPower.fromJSON(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromJSON(e)); - } - } - if ( - object.unbondingDelegations !== undefined && - object.unbondingDelegations !== null - ) { - for (const e of object.unbondingDelegations) { - message.unbondingDelegations.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromJSON(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = Boolean(object.exported); - } else { - message.exported = false; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.lastTotalPower !== undefined && - (obj.lastTotalPower = base64FromBytes( - message.lastTotalPower !== undefined - ? message.lastTotalPower - : new Uint8Array() - )); - if (message.lastValidatorPowers) { - obj.lastValidatorPowers = message.lastValidatorPowers.map((e) => - e ? LastValidatorPower.toJSON(e) : undefined - ); - } else { - obj.lastValidatorPowers = []; - } - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map((e) => - e ? Delegation.toJSON(e) : undefined - ); - } else { - obj.delegations = []; - } - if (message.unbondingDelegations) { - obj.unbondingDelegations = message.unbondingDelegations.map((e) => - e ? UnbondingDelegation.toJSON(e) : undefined - ); - } else { - obj.unbondingDelegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map((e) => - e ? Redelegation.toJSON(e) : undefined - ); - } else { - obj.redelegations = []; - } - message.exported !== undefined && (obj.exported = message.exported); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.lastTotalPower !== undefined && object.lastTotalPower !== null) { - message.lastTotalPower = object.lastTotalPower; - } else { - message.lastTotalPower = new Uint8Array(); - } - if ( - object.lastValidatorPowers !== undefined && - object.lastValidatorPowers !== null - ) { - for (const e of object.lastValidatorPowers) { - message.lastValidatorPowers.push(LastValidatorPower.fromPartial(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromPartial(e)); - } - } - if ( - object.unbondingDelegations !== undefined && - object.unbondingDelegations !== null - ) { - for (const e of object.unbondingDelegations) { - message.unbondingDelegations.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromPartial(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = object.exported; - } else { - message.exported = false; - } - return message; - }, -}; - -const baseLastValidatorPower: object = { address: "", power: 0 }; - -export const LastValidatorPower = { - encode( - message: LastValidatorPower, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LastValidatorPower { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastValidatorPower } as LastValidatorPower; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LastValidatorPower { - const message = { ...baseLastValidatorPower } as LastValidatorPower; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: LastValidatorPower): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): LastValidatorPower { - const message = { ...baseLastValidatorPower } as LastValidatorPower; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts deleted file mode 100644 index 1b2f32d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts +++ /dev/null @@ -1,493 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Validator, DelegationResponse, UnbondingDelegation, RedelegationResponse, HistoricalInfo, Pool, Params } from "../../../cosmos/staking/v1beta1/staking"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequest { - /** status enables to query for validators matching a given status. */ - status: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponse { - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse: DelegationResponse | undefined; -} -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond: UnbondingDelegation | undefined; -} -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** src_validator_addr defines the validator address to redelegate from. */ - srcValidatorAddr: string; - /** dst_validator_addr defines the validator address to redelegate to. */ - dstValidatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponse { - redelegationResponses: RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequest { - /** height defines at which height to query the historical info. */ - height: number; -} -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist: HistoricalInfo | undefined; -} -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequest { -} -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponse { - /** pool defines the pool info. */ - pool: Pool | undefined; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} -export declare const QueryValidatorsRequest: { - encode(message: QueryValidatorsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsRequest; - fromJSON(object: any): QueryValidatorsRequest; - toJSON(message: QueryValidatorsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorsRequest; -}; -export declare const QueryValidatorsResponse: { - encode(message: QueryValidatorsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsResponse; - fromJSON(object: any): QueryValidatorsResponse; - toJSON(message: QueryValidatorsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorsResponse; -}; -export declare const QueryValidatorRequest: { - encode(message: QueryValidatorRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorRequest; - fromJSON(object: any): QueryValidatorRequest; - toJSON(message: QueryValidatorRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorRequest; -}; -export declare const QueryValidatorResponse: { - encode(message: QueryValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorResponse; - fromJSON(object: any): QueryValidatorResponse; - toJSON(message: QueryValidatorResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorResponse; -}; -export declare const QueryValidatorDelegationsRequest: { - encode(message: QueryValidatorDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorDelegationsRequest; - fromJSON(object: any): QueryValidatorDelegationsRequest; - toJSON(message: QueryValidatorDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorDelegationsRequest; -}; -export declare const QueryValidatorDelegationsResponse: { - encode(message: QueryValidatorDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorDelegationsResponse; - fromJSON(object: any): QueryValidatorDelegationsResponse; - toJSON(message: QueryValidatorDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorDelegationsResponse; -}; -export declare const QueryValidatorUnbondingDelegationsRequest: { - encode(message: QueryValidatorUnbondingDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorUnbondingDelegationsRequest; - fromJSON(object: any): QueryValidatorUnbondingDelegationsRequest; - toJSON(message: QueryValidatorUnbondingDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsRequest; -}; -export declare const QueryValidatorUnbondingDelegationsResponse: { - encode(message: QueryValidatorUnbondingDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorUnbondingDelegationsResponse; - fromJSON(object: any): QueryValidatorUnbondingDelegationsResponse; - toJSON(message: QueryValidatorUnbondingDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsResponse; -}; -export declare const QueryDelegationRequest: { - encode(message: QueryDelegationRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRequest; - fromJSON(object: any): QueryDelegationRequest; - toJSON(message: QueryDelegationRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegationRequest; -}; -export declare const QueryDelegationResponse: { - encode(message: QueryDelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationResponse; - fromJSON(object: any): QueryDelegationResponse; - toJSON(message: QueryDelegationResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegationResponse; -}; -export declare const QueryUnbondingDelegationRequest: { - encode(message: QueryUnbondingDelegationRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnbondingDelegationRequest; - fromJSON(object: any): QueryUnbondingDelegationRequest; - toJSON(message: QueryUnbondingDelegationRequest): unknown; - fromPartial(object: DeepPartial): QueryUnbondingDelegationRequest; -}; -export declare const QueryUnbondingDelegationResponse: { - encode(message: QueryUnbondingDelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnbondingDelegationResponse; - fromJSON(object: any): QueryUnbondingDelegationResponse; - toJSON(message: QueryUnbondingDelegationResponse): unknown; - fromPartial(object: DeepPartial): QueryUnbondingDelegationResponse; -}; -export declare const QueryDelegatorDelegationsRequest: { - encode(message: QueryDelegatorDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorDelegationsRequest; - fromJSON(object: any): QueryDelegatorDelegationsRequest; - toJSON(message: QueryDelegatorDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorDelegationsRequest; -}; -export declare const QueryDelegatorDelegationsResponse: { - encode(message: QueryDelegatorDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorDelegationsResponse; - fromJSON(object: any): QueryDelegatorDelegationsResponse; - toJSON(message: QueryDelegatorDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorDelegationsResponse; -}; -export declare const QueryDelegatorUnbondingDelegationsRequest: { - encode(message: QueryDelegatorUnbondingDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorUnbondingDelegationsRequest; - fromJSON(object: any): QueryDelegatorUnbondingDelegationsRequest; - toJSON(message: QueryDelegatorUnbondingDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsRequest; -}; -export declare const QueryDelegatorUnbondingDelegationsResponse: { - encode(message: QueryDelegatorUnbondingDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorUnbondingDelegationsResponse; - fromJSON(object: any): QueryDelegatorUnbondingDelegationsResponse; - toJSON(message: QueryDelegatorUnbondingDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsResponse; -}; -export declare const QueryRedelegationsRequest: { - encode(message: QueryRedelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRedelegationsRequest; - fromJSON(object: any): QueryRedelegationsRequest; - toJSON(message: QueryRedelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryRedelegationsRequest; -}; -export declare const QueryRedelegationsResponse: { - encode(message: QueryRedelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRedelegationsResponse; - fromJSON(object: any): QueryRedelegationsResponse; - toJSON(message: QueryRedelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryRedelegationsResponse; -}; -export declare const QueryDelegatorValidatorsRequest: { - encode(message: QueryDelegatorValidatorsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest; - fromJSON(object: any): QueryDelegatorValidatorsRequest; - toJSON(message: QueryDelegatorValidatorsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest; -}; -export declare const QueryDelegatorValidatorsResponse: { - encode(message: QueryDelegatorValidatorsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse; - fromJSON(object: any): QueryDelegatorValidatorsResponse; - toJSON(message: QueryDelegatorValidatorsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse; -}; -export declare const QueryDelegatorValidatorRequest: { - encode(message: QueryDelegatorValidatorRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorRequest; - fromJSON(object: any): QueryDelegatorValidatorRequest; - toJSON(message: QueryDelegatorValidatorRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorRequest; -}; -export declare const QueryDelegatorValidatorResponse: { - encode(message: QueryDelegatorValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorResponse; - fromJSON(object: any): QueryDelegatorValidatorResponse; - toJSON(message: QueryDelegatorValidatorResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorResponse; -}; -export declare const QueryHistoricalInfoRequest: { - encode(message: QueryHistoricalInfoRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryHistoricalInfoRequest; - fromJSON(object: any): QueryHistoricalInfoRequest; - toJSON(message: QueryHistoricalInfoRequest): unknown; - fromPartial(object: DeepPartial): QueryHistoricalInfoRequest; -}; -export declare const QueryHistoricalInfoResponse: { - encode(message: QueryHistoricalInfoResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryHistoricalInfoResponse; - fromJSON(object: any): QueryHistoricalInfoResponse; - toJSON(message: QueryHistoricalInfoResponse): unknown; - fromPartial(object: DeepPartial): QueryHistoricalInfoResponse; -}; -export declare const QueryPoolRequest: { - encode(_: QueryPoolRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPoolRequest; - fromJSON(_: any): QueryPoolRequest; - toJSON(_: QueryPoolRequest): unknown; - fromPartial(_: DeepPartial): QueryPoolRequest; -}; -export declare const QueryPoolResponse: { - encode(message: QueryPoolResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPoolResponse; - fromJSON(object: any): QueryPoolResponse; - toJSON(message: QueryPoolResponse): unknown; - fromPartial(object: DeepPartial): QueryPoolResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Validators queries all validators that match the given status. */ - Validators(request: QueryValidatorsRequest): Promise; - /** Validator queries validator info for given validator address. */ - Validator(request: QueryValidatorRequest): Promise; - /** ValidatorDelegations queries delegate info for given validator. */ - ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ - ValidatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise; - /** Delegation queries delegate info for given validator delegator pair. */ - Delegation(request: QueryDelegationRequest): Promise; - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - /** DelegatorDelegations queries all delegations of a given delegator address. */ - DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - DelegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise; - /** Redelegations queries redelegations of given address. */ - Redelegations(request: QueryRedelegationsRequest): Promise; - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - /** HistoricalInfo queries the historical info for given height. */ - HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; - /** Pool queries the pool info. */ - Pool(request: QueryPoolRequest): Promise; - /** Parameters queries the staking parameters. */ - Params(request: QueryParamsRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Validators(request: QueryValidatorsRequest): Promise; - Validator(request: QueryValidatorRequest): Promise; - ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - ValidatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise; - Delegation(request: QueryDelegationRequest): Promise; - UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - DelegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise; - Redelegations(request: QueryRedelegationsRequest): Promise; - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; - Pool(request: QueryPoolRequest): Promise; - Params(request: QueryParamsRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js deleted file mode 100644 index 33024f2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js +++ /dev/null @@ -1,2122 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Validator, DelegationResponse, UnbondingDelegation, RedelegationResponse, HistoricalInfo, Pool, Params, } from "../../../cosmos/staking/v1beta1/staking"; -export const protobufPackage = "cosmos.staking.v1beta1"; -const baseQueryValidatorsRequest = { status: "" }; -export const QueryValidatorsRequest = { - encode(message, writer = Writer.create()) { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryValidatorsRequest }; - if (object.status !== undefined && object.status !== null) { - message.status = String(object.status); - } - else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.status !== undefined && (obj.status = message.status); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryValidatorsRequest }; - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorsResponse = {}; -export const QueryValidatorsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorsResponse, - }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorRequest = { validatorAddr: "" }; -export const QueryValidatorRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryValidatorRequest }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryValidatorRequest }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryValidatorResponse = {}; -export const QueryValidatorResponse = { - encode(message, writer = Writer.create()) { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryValidatorResponse }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryValidatorResponse }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, -}; -const baseQueryValidatorDelegationsRequest = { validatorAddr: "" }; -export const QueryValidatorDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorDelegationsResponse = {}; -export const QueryValidatorDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsResponse, - }; - message.delegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map((e) => e ? DelegationResponse.toJSON(e) : undefined); - } - else { - obj.delegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorUnbondingDelegationsRequest = { - validatorAddr: "", -}; -export const QueryValidatorUnbondingDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorUnbondingDelegationsResponse = {}; -export const QueryValidatorUnbondingDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined); - } - else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegationRequest = { - delegatorAddr: "", - validatorAddr: "", -}; -export const QueryDelegationRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDelegationRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDelegationRequest }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDelegationRequest }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryDelegationResponse = {}; -export const QueryDelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.delegationResponse !== undefined) { - DelegationResponse.encode(message.delegationResponse, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponse = DelegationResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationResponse, - }; - if (object.delegationResponse !== undefined && - object.delegationResponse !== null) { - message.delegationResponse = DelegationResponse.fromJSON(object.delegationResponse); - } - else { - message.delegationResponse = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegationResponse !== undefined && - (obj.delegationResponse = message.delegationResponse - ? DelegationResponse.toJSON(message.delegationResponse) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationResponse, - }; - if (object.delegationResponse !== undefined && - object.delegationResponse !== null) { - message.delegationResponse = DelegationResponse.fromPartial(object.delegationResponse); - } - else { - message.delegationResponse = undefined; - } - return message; - }, -}; -const baseQueryUnbondingDelegationRequest = { - delegatorAddr: "", - validatorAddr: "", -}; -export const QueryUnbondingDelegationRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnbondingDelegationRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnbondingDelegationRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryUnbondingDelegationResponse = {}; -export const QueryUnbondingDelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.unbond !== undefined) { - UnbondingDelegation.encode(message.unbond, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnbondingDelegationResponse, - }; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromJSON(object.unbond); - } - else { - message.unbond = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.unbond !== undefined && - (obj.unbond = message.unbond - ? UnbondingDelegation.toJSON(message.unbond) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnbondingDelegationResponse, - }; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromPartial(object.unbond); - } - else { - message.unbond = undefined; - } - return message; - }, -}; -const baseQueryDelegatorDelegationsRequest = { delegatorAddr: "" }; -export const QueryDelegatorDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorDelegationsResponse = {}; -export const QueryDelegatorDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsResponse, - }; - message.delegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map((e) => e ? DelegationResponse.toJSON(e) : undefined); - } - else { - obj.delegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorUnbondingDelegationsRequest = { - delegatorAddr: "", -}; -export const QueryDelegatorUnbondingDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorUnbondingDelegationsResponse = {}; -export const QueryDelegatorUnbondingDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined); - } - else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryRedelegationsRequest = { - delegatorAddr: "", - srcValidatorAddr: "", - dstValidatorAddr: "", -}; -export const QueryRedelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.srcValidatorAddr !== "") { - writer.uint32(18).string(message.srcValidatorAddr); - } - if (message.dstValidatorAddr !== "") { - writer.uint32(26).string(message.dstValidatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.srcValidatorAddr = reader.string(); - break; - case 3: - message.dstValidatorAddr = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRedelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.srcValidatorAddr !== undefined && - object.srcValidatorAddr !== null) { - message.srcValidatorAddr = String(object.srcValidatorAddr); - } - else { - message.srcValidatorAddr = ""; - } - if (object.dstValidatorAddr !== undefined && - object.dstValidatorAddr !== null) { - message.dstValidatorAddr = String(object.dstValidatorAddr); - } - else { - message.dstValidatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.srcValidatorAddr !== undefined && - (obj.srcValidatorAddr = message.srcValidatorAddr); - message.dstValidatorAddr !== undefined && - (obj.dstValidatorAddr = message.dstValidatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRedelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.srcValidatorAddr !== undefined && - object.srcValidatorAddr !== null) { - message.srcValidatorAddr = object.srcValidatorAddr; - } - else { - message.srcValidatorAddr = ""; - } - if (object.dstValidatorAddr !== undefined && - object.dstValidatorAddr !== null) { - message.dstValidatorAddr = object.dstValidatorAddr; - } - else { - message.dstValidatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryRedelegationsResponse = {}; -export const QueryRedelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.redelegationResponses) { - RedelegationResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsResponse, - }; - message.redelegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationResponses.push(RedelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRedelegationsResponse, - }; - message.redelegationResponses = []; - if (object.redelegationResponses !== undefined && - object.redelegationResponses !== null) { - for (const e of object.redelegationResponses) { - message.redelegationResponses.push(RedelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.redelegationResponses) { - obj.redelegationResponses = message.redelegationResponses.map((e) => e ? RedelegationResponse.toJSON(e) : undefined); - } - else { - obj.redelegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRedelegationsResponse, - }; - message.redelegationResponses = []; - if (object.redelegationResponses !== undefined && - object.redelegationResponses !== null) { - for (const e of object.redelegationResponses) { - message.redelegationResponses.push(RedelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorValidatorsRequest = { delegatorAddr: "" }; -export const QueryDelegatorValidatorsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorValidatorsResponse = {}; -export const QueryDelegatorValidatorsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorValidatorRequest = { - delegatorAddr: "", - validatorAddr: "", -}; -export const QueryDelegatorValidatorRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryDelegatorValidatorResponse = {}; -export const QueryDelegatorValidatorResponse = { - encode(message, writer = Writer.create()) { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorResponse, - }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorResponse, - }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, -}; -const baseQueryHistoricalInfoRequest = { height: 0 }; -export const QueryHistoricalInfoRequest = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryHistoricalInfoRequest, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryHistoricalInfoRequest, - }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseQueryHistoricalInfoResponse = {}; -export const QueryHistoricalInfoResponse = { - encode(message, writer = Writer.create()) { - if (message.hist !== undefined) { - HistoricalInfo.encode(message.hist, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hist = HistoricalInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryHistoricalInfoResponse, - }; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromJSON(object.hist); - } - else { - message.hist = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hist !== undefined && - (obj.hist = message.hist - ? HistoricalInfo.toJSON(message.hist) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryHistoricalInfoResponse, - }; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromPartial(object.hist); - } - else { - message.hist = undefined; - } - return message; - }, -}; -const baseQueryPoolRequest = {}; -export const QueryPoolRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryPoolRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryPoolRequest }; - return message; - }, -}; -const baseQueryPoolResponse = {}; -export const QueryPoolResponse = { - encode(message, writer = Writer.create()) { - if (message.pool !== undefined) { - Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool = Pool.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryPoolResponse }; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromJSON(object.pool); - } - else { - message.pool = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pool !== undefined && - (obj.pool = message.pool ? Pool.toJSON(message.pool) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryPoolResponse }; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromPartial(object.pool); - } - else { - message.pool = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Validators(request) { - const data = QueryValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validators", data); - return promise.then((data) => QueryValidatorsResponse.decode(new Reader(data))); - } - Validator(request) { - const data = QueryValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validator", data); - return promise.then((data) => QueryValidatorResponse.decode(new Reader(data))); - } - ValidatorDelegations(request) { - const data = QueryValidatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorDelegations", data); - return promise.then((data) => QueryValidatorDelegationsResponse.decode(new Reader(data))); - } - ValidatorUnbondingDelegations(request) { - const data = QueryValidatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorUnbondingDelegations", data); - return promise.then((data) => QueryValidatorUnbondingDelegationsResponse.decode(new Reader(data))); - } - Delegation(request) { - const data = QueryDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Delegation", data); - return promise.then((data) => QueryDelegationResponse.decode(new Reader(data))); - } - UnbondingDelegation(request) { - const data = QueryUnbondingDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "UnbondingDelegation", data); - return promise.then((data) => QueryUnbondingDelegationResponse.decode(new Reader(data))); - } - DelegatorDelegations(request) { - const data = QueryDelegatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorDelegations", data); - return promise.then((data) => QueryDelegatorDelegationsResponse.decode(new Reader(data))); - } - DelegatorUnbondingDelegations(request) { - const data = QueryDelegatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorUnbondingDelegations", data); - return promise.then((data) => QueryDelegatorUnbondingDelegationsResponse.decode(new Reader(data))); - } - Redelegations(request) { - const data = QueryRedelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Redelegations", data); - return promise.then((data) => QueryRedelegationsResponse.decode(new Reader(data))); - } - DelegatorValidators(request) { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidators", data); - return promise.then((data) => QueryDelegatorValidatorsResponse.decode(new Reader(data))); - } - DelegatorValidator(request) { - const data = QueryDelegatorValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidator", data); - return promise.then((data) => QueryDelegatorValidatorResponse.decode(new Reader(data))); - } - HistoricalInfo(request) { - const data = QueryHistoricalInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "HistoricalInfo", data); - return promise.then((data) => QueryHistoricalInfoResponse.decode(new Reader(data))); - } - Pool(request) { - const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Pool", data); - return promise.then((data) => QueryPoolResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts deleted file mode 100644 index 95e3adc..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts +++ /dev/null @@ -1,2939 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { - Validator, - DelegationResponse, - UnbondingDelegation, - RedelegationResponse, - HistoricalInfo, - Pool, - Params, -} from "../../../cosmos/staking/v1beta1/staking"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequest { - /** status enables to query for validators matching a given status. */ - status: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} - -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} - -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponse { - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} - -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse: DelegationResponse | undefined; -} - -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} - -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond: UnbondingDelegation | undefined; -} - -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** src_validator_addr defines the validator address to redelegate from. */ - srcValidatorAddr: string; - /** dst_validator_addr defines the validator address to redelegate to. */ - dstValidatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponse { - redelegationResponses: RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} - -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} - -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequest { - /** height defines at which height to query the historical info. */ - height: number; -} - -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist: HistoricalInfo | undefined; -} - -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequest {} - -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponse { - /** pool defines the pool info. */ - pool: Pool | undefined; -} - -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} - -const baseQueryValidatorsRequest: object = { status: "" }; - -export const QueryValidatorsRequest = { - encode( - message: QueryValidatorsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorsRequest } as QueryValidatorsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorsRequest { - const message = { ...baseQueryValidatorsRequest } as QueryValidatorsRequest; - if (object.status !== undefined && object.status !== null) { - message.status = String(object.status); - } else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorsRequest): unknown { - const obj: any = {}; - message.status !== undefined && (obj.status = message.status); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorsRequest { - const message = { ...baseQueryValidatorsRequest } as QueryValidatorsRequest; - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorsResponse: object = {}; - -export const QueryValidatorsResponse = { - encode( - message: QueryValidatorsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorsResponse, - } as QueryValidatorsResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorsResponse { - const message = { - ...baseQueryValidatorsResponse, - } as QueryValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorsResponse { - const message = { - ...baseQueryValidatorsResponse, - } as QueryValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorRequest: object = { validatorAddr: "" }; - -export const QueryValidatorRequest = { - encode( - message: QueryValidatorRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorRequest } as QueryValidatorRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorRequest { - const message = { ...baseQueryValidatorRequest } as QueryValidatorRequest; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - return message; - }, - - toJSON(message: QueryValidatorRequest): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorRequest { - const message = { ...baseQueryValidatorRequest } as QueryValidatorRequest; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - return message; - }, -}; - -const baseQueryValidatorResponse: object = {}; - -export const QueryValidatorResponse = { - encode( - message: QueryValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorResponse } as QueryValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorResponse { - const message = { ...baseQueryValidatorResponse } as QueryValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorResponse): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorResponse { - const message = { ...baseQueryValidatorResponse } as QueryValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - return message; - }, -}; - -const baseQueryValidatorDelegationsRequest: object = { validatorAddr: "" }; - -export const QueryValidatorDelegationsRequest = { - encode( - message: QueryValidatorDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsRequest, - } as QueryValidatorDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorDelegationsRequest { - const message = { - ...baseQueryValidatorDelegationsRequest, - } as QueryValidatorDelegationsRequest; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorDelegationsRequest): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorDelegationsRequest { - const message = { - ...baseQueryValidatorDelegationsRequest, - } as QueryValidatorDelegationsRequest; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorDelegationsResponse: object = {}; - -export const QueryValidatorDelegationsResponse = { - encode( - message: QueryValidatorDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsResponse, - } as QueryValidatorDelegationsResponse; - message.delegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push( - DelegationResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorDelegationsResponse { - const message = { - ...baseQueryValidatorDelegationsResponse, - } as QueryValidatorDelegationsResponse; - message.delegationResponses = []; - if ( - object.delegationResponses !== undefined && - object.delegationResponses !== null - ) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorDelegationsResponse): unknown { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map((e) => - e ? DelegationResponse.toJSON(e) : undefined - ); - } else { - obj.delegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorDelegationsResponse { - const message = { - ...baseQueryValidatorDelegationsResponse, - } as QueryValidatorDelegationsResponse; - message.delegationResponses = []; - if ( - object.delegationResponses !== undefined && - object.delegationResponses !== null - ) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorUnbondingDelegationsRequest: object = { - validatorAddr: "", -}; - -export const QueryValidatorUnbondingDelegationsRequest = { - encode( - message: QueryValidatorUnbondingDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorUnbondingDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - } as QueryValidatorUnbondingDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorUnbondingDelegationsRequest { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - } as QueryValidatorUnbondingDelegationsRequest; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorUnbondingDelegationsRequest): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorUnbondingDelegationsRequest { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - } as QueryValidatorUnbondingDelegationsRequest; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorUnbondingDelegationsResponse: object = {}; - -export const QueryValidatorUnbondingDelegationsResponse = { - encode( - message: QueryValidatorUnbondingDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorUnbondingDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - } as QueryValidatorUnbondingDelegationsResponse; - message.unbondingResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push( - UnbondingDelegation.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorUnbondingDelegationsResponse { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - } as QueryValidatorUnbondingDelegationsResponse; - message.unbondingResponses = []; - if ( - object.unbondingResponses !== undefined && - object.unbondingResponses !== null - ) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorUnbondingDelegationsResponse): unknown { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map((e) => - e ? UnbondingDelegation.toJSON(e) : undefined - ); - } else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorUnbondingDelegationsResponse { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - } as QueryValidatorUnbondingDelegationsResponse; - message.unbondingResponses = []; - if ( - object.unbondingResponses !== undefined && - object.unbondingResponses !== null - ) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegationRequest: object = { - delegatorAddr: "", - validatorAddr: "", -}; - -export const QueryDelegationRequest = { - encode( - message: QueryDelegationRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDelegationRequest } as QueryDelegationRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationRequest { - const message = { ...baseQueryDelegationRequest } as QueryDelegationRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - return message; - }, - - toJSON(message: QueryDelegationRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationRequest { - const message = { ...baseQueryDelegationRequest } as QueryDelegationRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - return message; - }, -}; - -const baseQueryDelegationResponse: object = {}; - -export const QueryDelegationResponse = { - encode( - message: QueryDelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.delegationResponse !== undefined) { - DelegationResponse.encode( - message.delegationResponse, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationResponse, - } as QueryDelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponse = DelegationResponse.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationResponse { - const message = { - ...baseQueryDelegationResponse, - } as QueryDelegationResponse; - if ( - object.delegationResponse !== undefined && - object.delegationResponse !== null - ) { - message.delegationResponse = DelegationResponse.fromJSON( - object.delegationResponse - ); - } else { - message.delegationResponse = undefined; - } - return message; - }, - - toJSON(message: QueryDelegationResponse): unknown { - const obj: any = {}; - message.delegationResponse !== undefined && - (obj.delegationResponse = message.delegationResponse - ? DelegationResponse.toJSON(message.delegationResponse) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationResponse { - const message = { - ...baseQueryDelegationResponse, - } as QueryDelegationResponse; - if ( - object.delegationResponse !== undefined && - object.delegationResponse !== null - ) { - message.delegationResponse = DelegationResponse.fromPartial( - object.delegationResponse - ); - } else { - message.delegationResponse = undefined; - } - return message; - }, -}; - -const baseQueryUnbondingDelegationRequest: object = { - delegatorAddr: "", - validatorAddr: "", -}; - -export const QueryUnbondingDelegationRequest = { - encode( - message: QueryUnbondingDelegationRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnbondingDelegationRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationRequest, - } as QueryUnbondingDelegationRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnbondingDelegationRequest { - const message = { - ...baseQueryUnbondingDelegationRequest, - } as QueryUnbondingDelegationRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - return message; - }, - - toJSON(message: QueryUnbondingDelegationRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnbondingDelegationRequest { - const message = { - ...baseQueryUnbondingDelegationRequest, - } as QueryUnbondingDelegationRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - return message; - }, -}; - -const baseQueryUnbondingDelegationResponse: object = {}; - -export const QueryUnbondingDelegationResponse = { - encode( - message: QueryUnbondingDelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.unbond !== undefined) { - UnbondingDelegation.encode( - message.unbond, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnbondingDelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationResponse, - } as QueryUnbondingDelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnbondingDelegationResponse { - const message = { - ...baseQueryUnbondingDelegationResponse, - } as QueryUnbondingDelegationResponse; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromJSON(object.unbond); - } else { - message.unbond = undefined; - } - return message; - }, - - toJSON(message: QueryUnbondingDelegationResponse): unknown { - const obj: any = {}; - message.unbond !== undefined && - (obj.unbond = message.unbond - ? UnbondingDelegation.toJSON(message.unbond) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnbondingDelegationResponse { - const message = { - ...baseQueryUnbondingDelegationResponse, - } as QueryUnbondingDelegationResponse; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromPartial(object.unbond); - } else { - message.unbond = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorDelegationsRequest: object = { delegatorAddr: "" }; - -export const QueryDelegatorDelegationsRequest = { - encode( - message: QueryDelegatorDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsRequest, - } as QueryDelegatorDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorDelegationsRequest { - const message = { - ...baseQueryDelegatorDelegationsRequest, - } as QueryDelegatorDelegationsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorDelegationsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorDelegationsRequest { - const message = { - ...baseQueryDelegatorDelegationsRequest, - } as QueryDelegatorDelegationsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorDelegationsResponse: object = {}; - -export const QueryDelegatorDelegationsResponse = { - encode( - message: QueryDelegatorDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsResponse, - } as QueryDelegatorDelegationsResponse; - message.delegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push( - DelegationResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorDelegationsResponse { - const message = { - ...baseQueryDelegatorDelegationsResponse, - } as QueryDelegatorDelegationsResponse; - message.delegationResponses = []; - if ( - object.delegationResponses !== undefined && - object.delegationResponses !== null - ) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorDelegationsResponse): unknown { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map((e) => - e ? DelegationResponse.toJSON(e) : undefined - ); - } else { - obj.delegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorDelegationsResponse { - const message = { - ...baseQueryDelegatorDelegationsResponse, - } as QueryDelegatorDelegationsResponse; - message.delegationResponses = []; - if ( - object.delegationResponses !== undefined && - object.delegationResponses !== null - ) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorUnbondingDelegationsRequest: object = { - delegatorAddr: "", -}; - -export const QueryDelegatorUnbondingDelegationsRequest = { - encode( - message: QueryDelegatorUnbondingDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorUnbondingDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - } as QueryDelegatorUnbondingDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorUnbondingDelegationsRequest { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - } as QueryDelegatorUnbondingDelegationsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorUnbondingDelegationsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorUnbondingDelegationsRequest { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - } as QueryDelegatorUnbondingDelegationsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorUnbondingDelegationsResponse: object = {}; - -export const QueryDelegatorUnbondingDelegationsResponse = { - encode( - message: QueryDelegatorUnbondingDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorUnbondingDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - } as QueryDelegatorUnbondingDelegationsResponse; - message.unbondingResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push( - UnbondingDelegation.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorUnbondingDelegationsResponse { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - } as QueryDelegatorUnbondingDelegationsResponse; - message.unbondingResponses = []; - if ( - object.unbondingResponses !== undefined && - object.unbondingResponses !== null - ) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorUnbondingDelegationsResponse): unknown { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map((e) => - e ? UnbondingDelegation.toJSON(e) : undefined - ); - } else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorUnbondingDelegationsResponse { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - } as QueryDelegatorUnbondingDelegationsResponse; - message.unbondingResponses = []; - if ( - object.unbondingResponses !== undefined && - object.unbondingResponses !== null - ) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryRedelegationsRequest: object = { - delegatorAddr: "", - srcValidatorAddr: "", - dstValidatorAddr: "", -}; - -export const QueryRedelegationsRequest = { - encode( - message: QueryRedelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.srcValidatorAddr !== "") { - writer.uint32(18).string(message.srcValidatorAddr); - } - if (message.dstValidatorAddr !== "") { - writer.uint32(26).string(message.dstValidatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRedelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsRequest, - } as QueryRedelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.srcValidatorAddr = reader.string(); - break; - case 3: - message.dstValidatorAddr = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRedelegationsRequest { - const message = { - ...baseQueryRedelegationsRequest, - } as QueryRedelegationsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if ( - object.srcValidatorAddr !== undefined && - object.srcValidatorAddr !== null - ) { - message.srcValidatorAddr = String(object.srcValidatorAddr); - } else { - message.srcValidatorAddr = ""; - } - if ( - object.dstValidatorAddr !== undefined && - object.dstValidatorAddr !== null - ) { - message.dstValidatorAddr = String(object.dstValidatorAddr); - } else { - message.dstValidatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryRedelegationsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.srcValidatorAddr !== undefined && - (obj.srcValidatorAddr = message.srcValidatorAddr); - message.dstValidatorAddr !== undefined && - (obj.dstValidatorAddr = message.dstValidatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRedelegationsRequest { - const message = { - ...baseQueryRedelegationsRequest, - } as QueryRedelegationsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if ( - object.srcValidatorAddr !== undefined && - object.srcValidatorAddr !== null - ) { - message.srcValidatorAddr = object.srcValidatorAddr; - } else { - message.srcValidatorAddr = ""; - } - if ( - object.dstValidatorAddr !== undefined && - object.dstValidatorAddr !== null - ) { - message.dstValidatorAddr = object.dstValidatorAddr; - } else { - message.dstValidatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryRedelegationsResponse: object = {}; - -export const QueryRedelegationsResponse = { - encode( - message: QueryRedelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.redelegationResponses) { - RedelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRedelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsResponse, - } as QueryRedelegationsResponse; - message.redelegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationResponses.push( - RedelegationResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRedelegationsResponse { - const message = { - ...baseQueryRedelegationsResponse, - } as QueryRedelegationsResponse; - message.redelegationResponses = []; - if ( - object.redelegationResponses !== undefined && - object.redelegationResponses !== null - ) { - for (const e of object.redelegationResponses) { - message.redelegationResponses.push(RedelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryRedelegationsResponse): unknown { - const obj: any = {}; - if (message.redelegationResponses) { - obj.redelegationResponses = message.redelegationResponses.map((e) => - e ? RedelegationResponse.toJSON(e) : undefined - ); - } else { - obj.redelegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRedelegationsResponse { - const message = { - ...baseQueryRedelegationsResponse, - } as QueryRedelegationsResponse; - message.redelegationResponses = []; - if ( - object.redelegationResponses !== undefined && - object.redelegationResponses !== null - ) { - for (const e of object.redelegationResponses) { - message.redelegationResponses.push(RedelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsRequest: object = { delegatorAddr: "" }; - -export const QueryDelegatorValidatorsRequest = { - encode( - message: QueryDelegatorValidatorsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsResponse: object = {}; - -export const QueryDelegatorValidatorsResponse = { - encode( - message: QueryDelegatorValidatorsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorRequest: object = { - delegatorAddr: "", - validatorAddr: "", -}; - -export const QueryDelegatorValidatorRequest = { - encode( - message: QueryDelegatorValidatorRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorRequest, - } as QueryDelegatorValidatorRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorRequest { - const message = { - ...baseQueryDelegatorValidatorRequest, - } as QueryDelegatorValidatorRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } else { - message.validatorAddr = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorRequest { - const message = { - ...baseQueryDelegatorValidatorRequest, - } as QueryDelegatorValidatorRequest; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } else { - message.validatorAddr = ""; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorResponse: object = {}; - -export const QueryDelegatorValidatorResponse = { - encode( - message: QueryDelegatorValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorResponse, - } as QueryDelegatorValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorResponse { - const message = { - ...baseQueryDelegatorValidatorResponse, - } as QueryDelegatorValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorResponse): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorResponse { - const message = { - ...baseQueryDelegatorValidatorResponse, - } as QueryDelegatorValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - return message; - }, -}; - -const baseQueryHistoricalInfoRequest: object = { height: 0 }; - -export const QueryHistoricalInfoRequest = { - encode( - message: QueryHistoricalInfoRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryHistoricalInfoRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoRequest, - } as QueryHistoricalInfoRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryHistoricalInfoRequest { - const message = { - ...baseQueryHistoricalInfoRequest, - } as QueryHistoricalInfoRequest; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: QueryHistoricalInfoRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryHistoricalInfoRequest { - const message = { - ...baseQueryHistoricalInfoRequest, - } as QueryHistoricalInfoRequest; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseQueryHistoricalInfoResponse: object = {}; - -export const QueryHistoricalInfoResponse = { - encode( - message: QueryHistoricalInfoResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.hist !== undefined) { - HistoricalInfo.encode(message.hist, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryHistoricalInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoResponse, - } as QueryHistoricalInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hist = HistoricalInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryHistoricalInfoResponse { - const message = { - ...baseQueryHistoricalInfoResponse, - } as QueryHistoricalInfoResponse; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromJSON(object.hist); - } else { - message.hist = undefined; - } - return message; - }, - - toJSON(message: QueryHistoricalInfoResponse): unknown { - const obj: any = {}; - message.hist !== undefined && - (obj.hist = message.hist - ? HistoricalInfo.toJSON(message.hist) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryHistoricalInfoResponse { - const message = { - ...baseQueryHistoricalInfoResponse, - } as QueryHistoricalInfoResponse; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromPartial(object.hist); - } else { - message.hist = undefined; - } - return message; - }, -}; - -const baseQueryPoolRequest: object = {}; - -export const QueryPoolRequest = { - encode(_: QueryPoolRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryPoolRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolRequest } as QueryPoolRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryPoolRequest { - const message = { ...baseQueryPoolRequest } as QueryPoolRequest; - return message; - }, - - toJSON(_: QueryPoolRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryPoolRequest { - const message = { ...baseQueryPoolRequest } as QueryPoolRequest; - return message; - }, -}; - -const baseQueryPoolResponse: object = {}; - -export const QueryPoolResponse = { - encode(message: QueryPoolResponse, writer: Writer = Writer.create()): Writer { - if (message.pool !== undefined) { - Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryPoolResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolResponse } as QueryPoolResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool = Pool.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPoolResponse { - const message = { ...baseQueryPoolResponse } as QueryPoolResponse; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromJSON(object.pool); - } else { - message.pool = undefined; - } - return message; - }, - - toJSON(message: QueryPoolResponse): unknown { - const obj: any = {}; - message.pool !== undefined && - (obj.pool = message.pool ? Pool.toJSON(message.pool) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryPoolResponse { - const message = { ...baseQueryPoolResponse } as QueryPoolResponse; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromPartial(object.pool); - } else { - message.pool = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Validators queries all validators that match the given status. */ - Validators(request: QueryValidatorsRequest): Promise; - /** Validator queries validator info for given validator address. */ - Validator(request: QueryValidatorRequest): Promise; - /** ValidatorDelegations queries delegate info for given validator. */ - ValidatorDelegations( - request: QueryValidatorDelegationsRequest - ): Promise; - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ - ValidatorUnbondingDelegations( - request: QueryValidatorUnbondingDelegationsRequest - ): Promise; - /** Delegation queries delegate info for given validator delegator pair. */ - Delegation(request: QueryDelegationRequest): Promise; - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - UnbondingDelegation( - request: QueryUnbondingDelegationRequest - ): Promise; - /** DelegatorDelegations queries all delegations of a given delegator address. */ - DelegatorDelegations( - request: QueryDelegatorDelegationsRequest - ): Promise; - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - DelegatorUnbondingDelegations( - request: QueryDelegatorUnbondingDelegationsRequest - ): Promise; - /** Redelegations queries redelegations of given address. */ - Redelegations( - request: QueryRedelegationsRequest - ): Promise; - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise; - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - DelegatorValidator( - request: QueryDelegatorValidatorRequest - ): Promise; - /** HistoricalInfo queries the historical info for given height. */ - HistoricalInfo( - request: QueryHistoricalInfoRequest - ): Promise; - /** Pool queries the pool info. */ - Pool(request: QueryPoolRequest): Promise; - /** Parameters queries the staking parameters. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Validators( - request: QueryValidatorsRequest - ): Promise { - const data = QueryValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Validators", - data - ); - return promise.then((data) => - QueryValidatorsResponse.decode(new Reader(data)) - ); - } - - Validator(request: QueryValidatorRequest): Promise { - const data = QueryValidatorRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Validator", - data - ); - return promise.then((data) => - QueryValidatorResponse.decode(new Reader(data)) - ); - } - - ValidatorDelegations( - request: QueryValidatorDelegationsRequest - ): Promise { - const data = QueryValidatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "ValidatorDelegations", - data - ); - return promise.then((data) => - QueryValidatorDelegationsResponse.decode(new Reader(data)) - ); - } - - ValidatorUnbondingDelegations( - request: QueryValidatorUnbondingDelegationsRequest - ): Promise { - const data = QueryValidatorUnbondingDelegationsRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "ValidatorUnbondingDelegations", - data - ); - return promise.then((data) => - QueryValidatorUnbondingDelegationsResponse.decode(new Reader(data)) - ); - } - - Delegation( - request: QueryDelegationRequest - ): Promise { - const data = QueryDelegationRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Delegation", - data - ); - return promise.then((data) => - QueryDelegationResponse.decode(new Reader(data)) - ); - } - - UnbondingDelegation( - request: QueryUnbondingDelegationRequest - ): Promise { - const data = QueryUnbondingDelegationRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "UnbondingDelegation", - data - ); - return promise.then((data) => - QueryUnbondingDelegationResponse.decode(new Reader(data)) - ); - } - - DelegatorDelegations( - request: QueryDelegatorDelegationsRequest - ): Promise { - const data = QueryDelegatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorDelegations", - data - ); - return promise.then((data) => - QueryDelegatorDelegationsResponse.decode(new Reader(data)) - ); - } - - DelegatorUnbondingDelegations( - request: QueryDelegatorUnbondingDelegationsRequest - ): Promise { - const data = QueryDelegatorUnbondingDelegationsRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorUnbondingDelegations", - data - ); - return promise.then((data) => - QueryDelegatorUnbondingDelegationsResponse.decode(new Reader(data)) - ); - } - - Redelegations( - request: QueryRedelegationsRequest - ): Promise { - const data = QueryRedelegationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Redelegations", - data - ); - return promise.then((data) => - QueryRedelegationsResponse.decode(new Reader(data)) - ); - } - - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorValidators", - data - ); - return promise.then((data) => - QueryDelegatorValidatorsResponse.decode(new Reader(data)) - ); - } - - DelegatorValidator( - request: QueryDelegatorValidatorRequest - ): Promise { - const data = QueryDelegatorValidatorRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorValidator", - data - ); - return promise.then((data) => - QueryDelegatorValidatorResponse.decode(new Reader(data)) - ); - } - - HistoricalInfo( - request: QueryHistoricalInfoRequest - ): Promise { - const data = QueryHistoricalInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "HistoricalInfo", - data - ); - return promise.then((data) => - QueryHistoricalInfoResponse.decode(new Reader(data)) - ); - } - - Pool(request: QueryPoolRequest): Promise { - const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Pool", - data - ); - return promise.then((data) => QueryPoolResponse.decode(new Reader(data))); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts deleted file mode 100644 index b309902..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts +++ /dev/null @@ -1,381 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Header } from "../../../tendermint/types/types"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** BondStatus is the status of a validator. */ -export declare enum BondStatus { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BOND_STATUS_UNSPECIFIED = 0, - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BOND_STATUS_UNBONDED = 1, - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BOND_STATUS_UNBONDING = 2, - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BOND_STATUS_BONDED = 3, - UNRECOGNIZED = -1 -} -export declare function bondStatusFromJSON(object: any): BondStatus; -export declare function bondStatusToJSON(object: BondStatus): string; -/** - * HistoricalInfo contains header and validator information for a given block. - * It is stored as part of staking module's state, which persists the `n` most - * recent HistoricalInfo - * (`n` is set by the staking module's `historical_entries` parameter). - */ -export interface HistoricalInfo { - header: Header | undefined; - valset: Validator[]; -} -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate: string; -} -/** Commission defines commission parameters for a given validator. */ -export interface Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates: CommissionRates | undefined; - /** update_time is the last time the commission rate was changed. */ - updateTime: Date | undefined; -} -/** Description defines a validator description. */ -export interface Description { - /** moniker defines a human-readable name for the validator. */ - moniker: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity: string; - /** website defines an optional website link. */ - website: string; - /** security_contact defines an optional email for security contact. */ - securityContact: string; - /** details define other optional details. */ - details: string; -} -/** - * Validator defines a validator, together with the total amount of the - * Validator's bond shares and their exchange rate to coins. Slashing results in - * a decrease in the exchange rate, allowing correct calculation of future - * undelegations without iterating over delegators. When coins are delegated to - * this validator, the validator is credited with a delegation whose number of - * bond shares is based on the amount of coins delegated divided by the current - * exchange rate. Voting power can be calculated as total bonded shares - * multiplied by exchange rate. - */ -export interface Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey: Any | undefined; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status: BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares: string; - /** description defines the description terms for the validator. */ - description: Description | undefined; - /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ - unbondingHeight: number; - /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbondingTime: Date | undefined; - /** commission defines the commission parameters. */ - commission: Commission | undefined; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation: string; -} -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddresses { - addresses: string[]; -} -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPair { - delegatorAddress: string; - validatorAddress: string; -} -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairs { - pairs: DVPair[]; -} -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTriplet { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; -} -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTriplets { - triplets: DVVTriplet[]; -} -/** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ -export interface Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** shares define the delegation shares received. */ - shares: string; -} -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** entries are the unbonding delegation entries. */ - entries: UnbondingDelegationEntry[]; -} -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntry { - /** creation_height is the height which the unbonding took place. */ - creationHeight: number; - /** completion_time is the unix time for unbonding completion. */ - completionTime: Date | undefined; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance: string; - /** balance defines the tokens to receive at completion. */ - balance: string; -} -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntry { - /** creation_height defines the height which the redelegation took place. */ - creationHeight: number; - /** completion_time defines the unix time for redelegation completion. */ - completionTime: Date | undefined; - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst: string; -} -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress: string; - /** entries are the redelegation entries. */ - entries: RedelegationEntry[]; -} -/** Params defines the parameters for the staking module. */ -export interface Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime: Duration | undefined; - /** max_validators is the maximum number of validators. */ - maxValidators: number; - /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */ - maxEntries: number; - /** historical_entries is the number of historical entries to persist. */ - historicalEntries: number; - /** bond_denom defines the bondable coin denomination. */ - bondDenom: string; -} -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponse { - delegation: Delegation | undefined; - balance: Coin | undefined; -} -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponse { - redelegationEntry: RedelegationEntry | undefined; - balance: string; -} -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponse { - redelegation: Redelegation | undefined; - entries: RedelegationEntryResponse[]; -} -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface Pool { - notBondedTokens: string; - bondedTokens: string; -} -export declare const HistoricalInfo: { - encode(message: HistoricalInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HistoricalInfo; - fromJSON(object: any): HistoricalInfo; - toJSON(message: HistoricalInfo): unknown; - fromPartial(object: DeepPartial): HistoricalInfo; -}; -export declare const CommissionRates: { - encode(message: CommissionRates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommissionRates; - fromJSON(object: any): CommissionRates; - toJSON(message: CommissionRates): unknown; - fromPartial(object: DeepPartial): CommissionRates; -}; -export declare const Commission: { - encode(message: Commission, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Commission; - fromJSON(object: any): Commission; - toJSON(message: Commission): unknown; - fromPartial(object: DeepPartial): Commission; -}; -export declare const Description: { - encode(message: Description, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Description; - fromJSON(object: any): Description; - toJSON(message: Description): unknown; - fromPartial(object: DeepPartial): Description; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const ValAddresses: { - encode(message: ValAddresses, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValAddresses; - fromJSON(object: any): ValAddresses; - toJSON(message: ValAddresses): unknown; - fromPartial(object: DeepPartial): ValAddresses; -}; -export declare const DVPair: { - encode(message: DVPair, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVPair; - fromJSON(object: any): DVPair; - toJSON(message: DVPair): unknown; - fromPartial(object: DeepPartial): DVPair; -}; -export declare const DVPairs: { - encode(message: DVPairs, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVPairs; - fromJSON(object: any): DVPairs; - toJSON(message: DVPairs): unknown; - fromPartial(object: DeepPartial): DVPairs; -}; -export declare const DVVTriplet: { - encode(message: DVVTriplet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVVTriplet; - fromJSON(object: any): DVVTriplet; - toJSON(message: DVVTriplet): unknown; - fromPartial(object: DeepPartial): DVVTriplet; -}; -export declare const DVVTriplets: { - encode(message: DVVTriplets, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVVTriplets; - fromJSON(object: any): DVVTriplets; - toJSON(message: DVVTriplets): unknown; - fromPartial(object: DeepPartial): DVVTriplets; -}; -export declare const Delegation: { - encode(message: Delegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Delegation; - fromJSON(object: any): Delegation; - toJSON(message: Delegation): unknown; - fromPartial(object: DeepPartial): Delegation; -}; -export declare const UnbondingDelegation: { - encode(message: UnbondingDelegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UnbondingDelegation; - fromJSON(object: any): UnbondingDelegation; - toJSON(message: UnbondingDelegation): unknown; - fromPartial(object: DeepPartial): UnbondingDelegation; -}; -export declare const UnbondingDelegationEntry: { - encode(message: UnbondingDelegationEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UnbondingDelegationEntry; - fromJSON(object: any): UnbondingDelegationEntry; - toJSON(message: UnbondingDelegationEntry): unknown; - fromPartial(object: DeepPartial): UnbondingDelegationEntry; -}; -export declare const RedelegationEntry: { - encode(message: RedelegationEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RedelegationEntry; - fromJSON(object: any): RedelegationEntry; - toJSON(message: RedelegationEntry): unknown; - fromPartial(object: DeepPartial): RedelegationEntry; -}; -export declare const Redelegation: { - encode(message: Redelegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Redelegation; - fromJSON(object: any): Redelegation; - toJSON(message: Redelegation): unknown; - fromPartial(object: DeepPartial): Redelegation; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const DelegationResponse: { - encode(message: DelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegationResponse; - fromJSON(object: any): DelegationResponse; - toJSON(message: DelegationResponse): unknown; - fromPartial(object: DeepPartial): DelegationResponse; -}; -export declare const RedelegationEntryResponse: { - encode(message: RedelegationEntryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RedelegationEntryResponse; - fromJSON(object: any): RedelegationEntryResponse; - toJSON(message: RedelegationEntryResponse): unknown; - fromPartial(object: DeepPartial): RedelegationEntryResponse; -}; -export declare const RedelegationResponse: { - encode(message: RedelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RedelegationResponse; - fromJSON(object: any): RedelegationResponse; - toJSON(message: RedelegationResponse): unknown; - fromPartial(object: DeepPartial): RedelegationResponse; -}; -export declare const Pool: { - encode(message: Pool, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Pool; - fromJSON(object: any): Pool; - toJSON(message: Pool): unknown; - fromPartial(object: DeepPartial): Pool; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js deleted file mode 100644 index b333be7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js +++ /dev/null @@ -1,2131 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Header } from "../../../tendermint/types/types"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.staking.v1beta1"; -/** BondStatus is the status of a validator. */ -export var BondStatus; -(function (BondStatus) { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BondStatus[BondStatus["BOND_STATUS_UNSPECIFIED"] = 0] = "BOND_STATUS_UNSPECIFIED"; - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BondStatus[BondStatus["BOND_STATUS_UNBONDED"] = 1] = "BOND_STATUS_UNBONDED"; - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BondStatus[BondStatus["BOND_STATUS_UNBONDING"] = 2] = "BOND_STATUS_UNBONDING"; - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BondStatus[BondStatus["BOND_STATUS_BONDED"] = 3] = "BOND_STATUS_BONDED"; - BondStatus[BondStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(BondStatus || (BondStatus = {})); -export function bondStatusFromJSON(object) { - switch (object) { - case 0: - case "BOND_STATUS_UNSPECIFIED": - return BondStatus.BOND_STATUS_UNSPECIFIED; - case 1: - case "BOND_STATUS_UNBONDED": - return BondStatus.BOND_STATUS_UNBONDED; - case 2: - case "BOND_STATUS_UNBONDING": - return BondStatus.BOND_STATUS_UNBONDING; - case 3: - case "BOND_STATUS_BONDED": - return BondStatus.BOND_STATUS_BONDED; - case -1: - case "UNRECOGNIZED": - default: - return BondStatus.UNRECOGNIZED; - } -} -export function bondStatusToJSON(object) { - switch (object) { - case BondStatus.BOND_STATUS_UNSPECIFIED: - return "BOND_STATUS_UNSPECIFIED"; - case BondStatus.BOND_STATUS_UNBONDED: - return "BOND_STATUS_UNBONDED"; - case BondStatus.BOND_STATUS_UNBONDING: - return "BOND_STATUS_UNBONDING"; - case BondStatus.BOND_STATUS_BONDED: - return "BOND_STATUS_BONDED"; - default: - return "UNKNOWN"; - } -} -const baseHistoricalInfo = {}; -export const HistoricalInfo = { - encode(message, writer = Writer.create()) { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.valset) { - Validator.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHistoricalInfo }; - message.valset = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.valset.push(Validator.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHistoricalInfo }; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - if (message.valset) { - obj.valset = message.valset.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.valset = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHistoricalInfo }; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommissionRates = { - rate: "", - maxRate: "", - maxChangeRate: "", -}; -export const CommissionRates = { - encode(message, writer = Writer.create()) { - if (message.rate !== "") { - writer.uint32(10).string(message.rate); - } - if (message.maxRate !== "") { - writer.uint32(18).string(message.maxRate); - } - if (message.maxChangeRate !== "") { - writer.uint32(26).string(message.maxChangeRate); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommissionRates }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rate = reader.string(); - break; - case 2: - message.maxRate = reader.string(); - break; - case 3: - message.maxChangeRate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommissionRates }; - if (object.rate !== undefined && object.rate !== null) { - message.rate = String(object.rate); - } - else { - message.rate = ""; - } - if (object.maxRate !== undefined && object.maxRate !== null) { - message.maxRate = String(object.maxRate); - } - else { - message.maxRate = ""; - } - if (object.maxChangeRate !== undefined && object.maxChangeRate !== null) { - message.maxChangeRate = String(object.maxChangeRate); - } - else { - message.maxChangeRate = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rate !== undefined && (obj.rate = message.rate); - message.maxRate !== undefined && (obj.maxRate = message.maxRate); - message.maxChangeRate !== undefined && - (obj.maxChangeRate = message.maxChangeRate); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommissionRates }; - if (object.rate !== undefined && object.rate !== null) { - message.rate = object.rate; - } - else { - message.rate = ""; - } - if (object.maxRate !== undefined && object.maxRate !== null) { - message.maxRate = object.maxRate; - } - else { - message.maxRate = ""; - } - if (object.maxChangeRate !== undefined && object.maxChangeRate !== null) { - message.maxChangeRate = object.maxChangeRate; - } - else { - message.maxChangeRate = ""; - } - return message; - }, -}; -const baseCommission = {}; -export const Commission = { - encode(message, writer = Writer.create()) { - if (message.commissionRates !== undefined) { - CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim(); - } - if (message.updateTime !== undefined) { - Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommission }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commissionRates = CommissionRates.decode(reader, reader.uint32()); - break; - case 2: - message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommission }; - if (object.commissionRates !== undefined && - object.commissionRates !== null) { - message.commissionRates = CommissionRates.fromJSON(object.commissionRates); - } - else { - message.commissionRates = undefined; - } - if (object.updateTime !== undefined && object.updateTime !== null) { - message.updateTime = fromJsonTimestamp(object.updateTime); - } - else { - message.updateTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.commissionRates !== undefined && - (obj.commissionRates = message.commissionRates - ? CommissionRates.toJSON(message.commissionRates) - : undefined); - message.updateTime !== undefined && - (obj.updateTime = - message.updateTime !== undefined - ? message.updateTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommission }; - if (object.commissionRates !== undefined && - object.commissionRates !== null) { - message.commissionRates = CommissionRates.fromPartial(object.commissionRates); - } - else { - message.commissionRates = undefined; - } - if (object.updateTime !== undefined && object.updateTime !== null) { - message.updateTime = object.updateTime; - } - else { - message.updateTime = undefined; - } - return message; - }, -}; -const baseDescription = { - moniker: "", - identity: "", - website: "", - securityContact: "", - details: "", -}; -export const Description = { - encode(message, writer = Writer.create()) { - if (message.moniker !== "") { - writer.uint32(10).string(message.moniker); - } - if (message.identity !== "") { - writer.uint32(18).string(message.identity); - } - if (message.website !== "") { - writer.uint32(26).string(message.website); - } - if (message.securityContact !== "") { - writer.uint32(34).string(message.securityContact); - } - if (message.details !== "") { - writer.uint32(42).string(message.details); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescription }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moniker = reader.string(); - break; - case 2: - message.identity = reader.string(); - break; - case 3: - message.website = reader.string(); - break; - case 4: - message.securityContact = reader.string(); - break; - case 5: - message.details = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescription }; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = String(object.moniker); - } - else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = String(object.identity); - } - else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = String(object.website); - } - else { - message.website = ""; - } - if (object.securityContact !== undefined && - object.securityContact !== null) { - message.securityContact = String(object.securityContact); - } - else { - message.securityContact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = String(object.details); - } - else { - message.details = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.moniker !== undefined && (obj.moniker = message.moniker); - message.identity !== undefined && (obj.identity = message.identity); - message.website !== undefined && (obj.website = message.website); - message.securityContact !== undefined && - (obj.securityContact = message.securityContact); - message.details !== undefined && (obj.details = message.details); - return obj; - }, - fromPartial(object) { - const message = { ...baseDescription }; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = object.moniker; - } - else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = object.identity; - } - else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = object.website; - } - else { - message.website = ""; - } - if (object.securityContact !== undefined && - object.securityContact !== null) { - message.securityContact = object.securityContact; - } - else { - message.securityContact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = object.details; - } - else { - message.details = ""; - } - return message; - }, -}; -const baseValidator = { - operatorAddress: "", - jailed: false, - status: 0, - tokens: "", - delegatorShares: "", - unbondingHeight: 0, - minSelfDelegation: "", -}; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.operatorAddress !== "") { - writer.uint32(10).string(message.operatorAddress); - } - if (message.consensusPubkey !== undefined) { - Any.encode(message.consensusPubkey, writer.uint32(18).fork()).ldelim(); - } - if (message.jailed === true) { - writer.uint32(24).bool(message.jailed); - } - if (message.status !== 0) { - writer.uint32(32).int32(message.status); - } - if (message.tokens !== "") { - writer.uint32(42).string(message.tokens); - } - if (message.delegatorShares !== "") { - writer.uint32(50).string(message.delegatorShares); - } - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(58).fork()).ldelim(); - } - if (message.unbondingHeight !== 0) { - writer.uint32(64).int64(message.unbondingHeight); - } - if (message.unbondingTime !== undefined) { - Timestamp.encode(toTimestamp(message.unbondingTime), writer.uint32(74).fork()).ldelim(); - } - if (message.commission !== undefined) { - Commission.encode(message.commission, writer.uint32(82).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(90).string(message.minSelfDelegation); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operatorAddress = reader.string(); - break; - case 2: - message.consensusPubkey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.jailed = reader.bool(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.tokens = reader.string(); - break; - case 6: - message.delegatorShares = reader.string(); - break; - case 7: - message.description = Description.decode(reader, reader.uint32()); - break; - case 8: - message.unbondingHeight = longToNumber(reader.int64()); - break; - case 9: - message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 10: - message.commission = Commission.decode(reader, reader.uint32()); - break; - case 11: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.operatorAddress !== undefined && - object.operatorAddress !== null) { - message.operatorAddress = String(object.operatorAddress); - } - else { - message.operatorAddress = ""; - } - if (object.consensusPubkey !== undefined && - object.consensusPubkey !== null) { - message.consensusPubkey = Any.fromJSON(object.consensusPubkey); - } - else { - message.consensusPubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = Boolean(object.jailed); - } - else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = bondStatusFromJSON(object.status); - } - else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = String(object.tokens); - } - else { - message.tokens = ""; - } - if (object.delegatorShares !== undefined && - object.delegatorShares !== null) { - message.delegatorShares = String(object.delegatorShares); - } - else { - message.delegatorShares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } - else { - message.description = undefined; - } - if (object.unbondingHeight !== undefined && - object.unbondingHeight !== null) { - message.unbondingHeight = Number(object.unbondingHeight); - } - else { - message.unbondingHeight = 0; - } - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = fromJsonTimestamp(object.unbondingTime); - } - else { - message.unbondingTime = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromJSON(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = String(object.minSelfDelegation); - } - else { - message.minSelfDelegation = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.operatorAddress !== undefined && - (obj.operatorAddress = message.operatorAddress); - message.consensusPubkey !== undefined && - (obj.consensusPubkey = message.consensusPubkey - ? Any.toJSON(message.consensusPubkey) - : undefined); - message.jailed !== undefined && (obj.jailed = message.jailed); - message.status !== undefined && - (obj.status = bondStatusToJSON(message.status)); - message.tokens !== undefined && (obj.tokens = message.tokens); - message.delegatorShares !== undefined && - (obj.delegatorShares = message.delegatorShares); - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.unbondingHeight !== undefined && - (obj.unbondingHeight = message.unbondingHeight); - message.unbondingTime !== undefined && - (obj.unbondingTime = - message.unbondingTime !== undefined - ? message.unbondingTime.toISOString() - : null); - message.commission !== undefined && - (obj.commission = message.commission - ? Commission.toJSON(message.commission) - : undefined); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.operatorAddress !== undefined && - object.operatorAddress !== null) { - message.operatorAddress = object.operatorAddress; - } - else { - message.operatorAddress = ""; - } - if (object.consensusPubkey !== undefined && - object.consensusPubkey !== null) { - message.consensusPubkey = Any.fromPartial(object.consensusPubkey); - } - else { - message.consensusPubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = object.jailed; - } - else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = object.tokens; - } - else { - message.tokens = ""; - } - if (object.delegatorShares !== undefined && - object.delegatorShares !== null) { - message.delegatorShares = object.delegatorShares; - } - else { - message.delegatorShares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } - else { - message.description = undefined; - } - if (object.unbondingHeight !== undefined && - object.unbondingHeight !== null) { - message.unbondingHeight = object.unbondingHeight; - } - else { - message.unbondingHeight = 0; - } - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = object.unbondingTime; - } - else { - message.unbondingTime = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromPartial(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = object.minSelfDelegation; - } - else { - message.minSelfDelegation = ""; - } - return message; - }, -}; -const baseValAddresses = { addresses: "" }; -export const ValAddresses = { - encode(message, writer = Writer.create()) { - for (const v of message.addresses) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValAddresses }; - message.addresses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValAddresses }; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.addresses) { - obj.addresses = message.addresses.map((e) => e); - } - else { - obj.addresses = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValAddresses }; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(e); - } - } - return message; - }, -}; -const baseDVPair = { delegatorAddress: "", validatorAddress: "" }; -export const DVPair = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPair }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVPair }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseDVPair }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseDVPairs = {}; -export const DVPairs = { - encode(message, writer = Writer.create()) { - for (const v of message.pairs) { - DVPair.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPairs }; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(DVPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVPairs }; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined)); - } - else { - obj.pairs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDVPairs }; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromPartial(e)); - } - } - return message; - }, -}; -const baseDVVTriplet = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; -export const DVVTriplet = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplet }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVVTriplet }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = String(object.validatorDstAddress); - } - else { - message.validatorDstAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseDVVTriplet }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = object.validatorSrcAddress; - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = object.validatorDstAddress; - } - else { - message.validatorDstAddress = ""; - } - return message; - }, -}; -const baseDVVTriplets = {}; -export const DVVTriplets = { - encode(message, writer = Writer.create()) { - for (const v of message.triplets) { - DVVTriplet.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplets }; - message.triplets = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVVTriplets }; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.triplets) { - obj.triplets = message.triplets.map((e) => e ? DVVTriplet.toJSON(e) : undefined); - } - else { - obj.triplets = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDVVTriplets }; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromPartial(e)); - } - } - return message; - }, -}; -const baseDelegation = { - delegatorAddress: "", - validatorAddress: "", - shares: "", -}; -export const Delegation = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.shares !== "") { - writer.uint32(26).string(message.shares); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.shares = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegation }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = String(object.shares); - } - else { - message.shares = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.shares !== undefined && (obj.shares = message.shares); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegation }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = object.shares; - } - else { - message.shares = ""; - } - return message; - }, -}; -const baseUnbondingDelegation = { - delegatorAddress: "", - validatorAddress: "", -}; -export const UnbondingDelegation = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - for (const v of message.entries) { - UnbondingDelegationEntry.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUnbondingDelegation }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUnbondingDelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? UnbondingDelegationEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseUnbondingDelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; -const baseUnbondingDelegationEntry = { - creationHeight: 0, - initialBalance: "", - balance: "", -}; -export const UnbondingDelegationEntry = { - encode(message, writer = Writer.create()) { - if (message.creationHeight !== 0) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUnbondingDelegationEntry, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = longToNumber(reader.int64()); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUnbondingDelegationEntry, - }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = Number(object.creationHeight); - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = String(object.initialBalance); - } - else { - message.initialBalance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } - else { - message.balance = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creationHeight !== undefined && - (obj.creationHeight = message.creationHeight); - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - message.initialBalance !== undefined && - (obj.initialBalance = message.initialBalance); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUnbondingDelegationEntry, - }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = object.creationHeight; - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = object.initialBalance; - } - else { - message.initialBalance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } - else { - message.balance = ""; - } - return message; - }, -}; -const baseRedelegationEntry = { - creationHeight: 0, - initialBalance: "", - sharesDst: "", -}; -export const RedelegationEntry = { - encode(message, writer = Writer.create()) { - if (message.creationHeight !== 0) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.sharesDst !== "") { - writer.uint32(34).string(message.sharesDst); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationEntry }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = longToNumber(reader.int64()); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.sharesDst = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRedelegationEntry }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = Number(object.creationHeight); - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = String(object.initialBalance); - } - else { - message.initialBalance = ""; - } - if (object.sharesDst !== undefined && object.sharesDst !== null) { - message.sharesDst = String(object.sharesDst); - } - else { - message.sharesDst = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creationHeight !== undefined && - (obj.creationHeight = message.creationHeight); - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - message.initialBalance !== undefined && - (obj.initialBalance = message.initialBalance); - message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst); - return obj; - }, - fromPartial(object) { - const message = { ...baseRedelegationEntry }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = object.creationHeight; - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = object.initialBalance; - } - else { - message.initialBalance = ""; - } - if (object.sharesDst !== undefined && object.sharesDst !== null) { - message.sharesDst = object.sharesDst; - } - else { - message.sharesDst = ""; - } - return message; - }, -}; -const baseRedelegation = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; -export const Redelegation = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - for (const v of message.entries) { - RedelegationEntry.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegation }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.entries.push(RedelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRedelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = String(object.validatorDstAddress); - } - else { - message.validatorDstAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? RedelegationEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRedelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = object.validatorSrcAddress; - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = object.validatorDstAddress; - } - else { - message.validatorDstAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; -const baseParams = { - maxValidators: 0, - maxEntries: 0, - historicalEntries: 0, - bondDenom: "", -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.unbondingTime !== undefined) { - Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim(); - } - if (message.maxValidators !== 0) { - writer.uint32(16).uint32(message.maxValidators); - } - if (message.maxEntries !== 0) { - writer.uint32(24).uint32(message.maxEntries); - } - if (message.historicalEntries !== 0) { - writer.uint32(32).uint32(message.historicalEntries); - } - if (message.bondDenom !== "") { - writer.uint32(42).string(message.bondDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingTime = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.maxValidators = reader.uint32(); - break; - case 3: - message.maxEntries = reader.uint32(); - break; - case 4: - message.historicalEntries = reader.uint32(); - break; - case 5: - message.bondDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = Duration.fromJSON(object.unbondingTime); - } - else { - message.unbondingTime = undefined; - } - if (object.maxValidators !== undefined && object.maxValidators !== null) { - message.maxValidators = Number(object.maxValidators); - } - else { - message.maxValidators = 0; - } - if (object.maxEntries !== undefined && object.maxEntries !== null) { - message.maxEntries = Number(object.maxEntries); - } - else { - message.maxEntries = 0; - } - if (object.historicalEntries !== undefined && - object.historicalEntries !== null) { - message.historicalEntries = Number(object.historicalEntries); - } - else { - message.historicalEntries = 0; - } - if (object.bondDenom !== undefined && object.bondDenom !== null) { - message.bondDenom = String(object.bondDenom); - } - else { - message.bondDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.unbondingTime !== undefined && - (obj.unbondingTime = message.unbondingTime - ? Duration.toJSON(message.unbondingTime) - : undefined); - message.maxValidators !== undefined && - (obj.maxValidators = message.maxValidators); - message.maxEntries !== undefined && (obj.maxEntries = message.maxEntries); - message.historicalEntries !== undefined && - (obj.historicalEntries = message.historicalEntries); - message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = Duration.fromPartial(object.unbondingTime); - } - else { - message.unbondingTime = undefined; - } - if (object.maxValidators !== undefined && object.maxValidators !== null) { - message.maxValidators = object.maxValidators; - } - else { - message.maxValidators = 0; - } - if (object.maxEntries !== undefined && object.maxEntries !== null) { - message.maxEntries = object.maxEntries; - } - else { - message.maxEntries = 0; - } - if (object.historicalEntries !== undefined && - object.historicalEntries !== null) { - message.historicalEntries = object.historicalEntries; - } - else { - message.historicalEntries = 0; - } - if (object.bondDenom !== undefined && object.bondDenom !== null) { - message.bondDenom = object.bondDenom; - } - else { - message.bondDenom = ""; - } - return message; - }, -}; -const baseDelegationResponse = {}; -export const DelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.delegation !== undefined) { - Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegationResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation = Delegation.decode(reader, reader.uint32()); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegationResponse }; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromJSON(object.delegation); - } - else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegation !== undefined && - (obj.delegation = message.delegation - ? Delegation.toJSON(message.delegation) - : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegationResponse }; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromPartial(object.delegation); - } - else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, -}; -const baseRedelegationEntryResponse = { balance: "" }; -export const RedelegationEntryResponse = { - encode(message, writer = Writer.create()) { - if (message.redelegationEntry !== undefined) { - RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRedelegationEntryResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32()); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseRedelegationEntryResponse, - }; - if (object.redelegationEntry !== undefined && - object.redelegationEntry !== null) { - message.redelegationEntry = RedelegationEntry.fromJSON(object.redelegationEntry); - } - else { - message.redelegationEntry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } - else { - message.balance = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.redelegationEntry !== undefined && - (obj.redelegationEntry = message.redelegationEntry - ? RedelegationEntry.toJSON(message.redelegationEntry) - : undefined); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - fromPartial(object) { - const message = { - ...baseRedelegationEntryResponse, - }; - if (object.redelegationEntry !== undefined && - object.redelegationEntry !== null) { - message.redelegationEntry = RedelegationEntry.fromPartial(object.redelegationEntry); - } - else { - message.redelegationEntry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } - else { - message.balance = ""; - } - return message; - }, -}; -const baseRedelegationResponse = {}; -export const RedelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.redelegation !== undefined) { - Redelegation.encode(message.redelegation, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.entries) { - RedelegationEntryResponse.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationResponse }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation = Redelegation.decode(reader, reader.uint32()); - break; - case 2: - message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRedelegationResponse }; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromJSON(object.redelegation); - } - else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.redelegation !== undefined && - (obj.redelegation = message.redelegation - ? Redelegation.toJSON(message.redelegation) - : undefined); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? RedelegationEntryResponse.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRedelegationResponse }; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromPartial(object.redelegation); - } - else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromPartial(e)); - } - } - return message; - }, -}; -const basePool = { notBondedTokens: "", bondedTokens: "" }; -export const Pool = { - encode(message, writer = Writer.create()) { - if (message.notBondedTokens !== "") { - writer.uint32(10).string(message.notBondedTokens); - } - if (message.bondedTokens !== "") { - writer.uint32(18).string(message.bondedTokens); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePool }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notBondedTokens = reader.string(); - break; - case 2: - message.bondedTokens = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePool }; - if (object.notBondedTokens !== undefined && - object.notBondedTokens !== null) { - message.notBondedTokens = String(object.notBondedTokens); - } - else { - message.notBondedTokens = ""; - } - if (object.bondedTokens !== undefined && object.bondedTokens !== null) { - message.bondedTokens = String(object.bondedTokens); - } - else { - message.bondedTokens = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.notBondedTokens !== undefined && - (obj.notBondedTokens = message.notBondedTokens); - message.bondedTokens !== undefined && - (obj.bondedTokens = message.bondedTokens); - return obj; - }, - fromPartial(object) { - const message = { ...basePool }; - if (object.notBondedTokens !== undefined && - object.notBondedTokens !== null) { - message.notBondedTokens = object.notBondedTokens; - } - else { - message.notBondedTokens = ""; - } - if (object.bondedTokens !== undefined && object.bondedTokens !== null) { - message.bondedTokens = object.bondedTokens; - } - else { - message.bondedTokens = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts deleted file mode 100644 index 609cc76..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts +++ /dev/null @@ -1,2561 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Header } from "../../../tendermint/types/types"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** BondStatus is the status of a validator. */ -export enum BondStatus { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BOND_STATUS_UNSPECIFIED = 0, - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BOND_STATUS_UNBONDED = 1, - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BOND_STATUS_UNBONDING = 2, - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BOND_STATUS_BONDED = 3, - UNRECOGNIZED = -1, -} - -export function bondStatusFromJSON(object: any): BondStatus { - switch (object) { - case 0: - case "BOND_STATUS_UNSPECIFIED": - return BondStatus.BOND_STATUS_UNSPECIFIED; - case 1: - case "BOND_STATUS_UNBONDED": - return BondStatus.BOND_STATUS_UNBONDED; - case 2: - case "BOND_STATUS_UNBONDING": - return BondStatus.BOND_STATUS_UNBONDING; - case 3: - case "BOND_STATUS_BONDED": - return BondStatus.BOND_STATUS_BONDED; - case -1: - case "UNRECOGNIZED": - default: - return BondStatus.UNRECOGNIZED; - } -} - -export function bondStatusToJSON(object: BondStatus): string { - switch (object) { - case BondStatus.BOND_STATUS_UNSPECIFIED: - return "BOND_STATUS_UNSPECIFIED"; - case BondStatus.BOND_STATUS_UNBONDED: - return "BOND_STATUS_UNBONDED"; - case BondStatus.BOND_STATUS_UNBONDING: - return "BOND_STATUS_UNBONDING"; - case BondStatus.BOND_STATUS_BONDED: - return "BOND_STATUS_BONDED"; - default: - return "UNKNOWN"; - } -} - -/** - * HistoricalInfo contains header and validator information for a given block. - * It is stored as part of staking module's state, which persists the `n` most - * recent HistoricalInfo - * (`n` is set by the staking module's `historical_entries` parameter). - */ -export interface HistoricalInfo { - header: Header | undefined; - valset: Validator[]; -} - -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate: string; -} - -/** Commission defines commission parameters for a given validator. */ -export interface Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates: CommissionRates | undefined; - /** update_time is the last time the commission rate was changed. */ - updateTime: Date | undefined; -} - -/** Description defines a validator description. */ -export interface Description { - /** moniker defines a human-readable name for the validator. */ - moniker: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity: string; - /** website defines an optional website link. */ - website: string; - /** security_contact defines an optional email for security contact. */ - securityContact: string; - /** details define other optional details. */ - details: string; -} - -/** - * Validator defines a validator, together with the total amount of the - * Validator's bond shares and their exchange rate to coins. Slashing results in - * a decrease in the exchange rate, allowing correct calculation of future - * undelegations without iterating over delegators. When coins are delegated to - * this validator, the validator is credited with a delegation whose number of - * bond shares is based on the amount of coins delegated divided by the current - * exchange rate. Voting power can be calculated as total bonded shares - * multiplied by exchange rate. - */ -export interface Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey: Any | undefined; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status: BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares: string; - /** description defines the description terms for the validator. */ - description: Description | undefined; - /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ - unbondingHeight: number; - /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbondingTime: Date | undefined; - /** commission defines the commission parameters. */ - commission: Commission | undefined; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation: string; -} - -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddresses { - addresses: string[]; -} - -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPair { - delegatorAddress: string; - validatorAddress: string; -} - -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairs { - pairs: DVPair[]; -} - -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTriplet { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; -} - -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTriplets { - triplets: DVVTriplet[]; -} - -/** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ -export interface Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** shares define the delegation shares received. */ - shares: string; -} - -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** entries are the unbonding delegation entries. */ - entries: UnbondingDelegationEntry[]; -} - -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntry { - /** creation_height is the height which the unbonding took place. */ - creationHeight: number; - /** completion_time is the unix time for unbonding completion. */ - completionTime: Date | undefined; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance: string; - /** balance defines the tokens to receive at completion. */ - balance: string; -} - -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntry { - /** creation_height defines the height which the redelegation took place. */ - creationHeight: number; - /** completion_time defines the unix time for redelegation completion. */ - completionTime: Date | undefined; - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst: string; -} - -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress: string; - /** entries are the redelegation entries. */ - entries: RedelegationEntry[]; -} - -/** Params defines the parameters for the staking module. */ -export interface Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime: Duration | undefined; - /** max_validators is the maximum number of validators. */ - maxValidators: number; - /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */ - maxEntries: number; - /** historical_entries is the number of historical entries to persist. */ - historicalEntries: number; - /** bond_denom defines the bondable coin denomination. */ - bondDenom: string; -} - -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponse { - delegation: Delegation | undefined; - balance: Coin | undefined; -} - -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponse { - redelegationEntry: RedelegationEntry | undefined; - balance: string; -} - -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponse { - redelegation: Redelegation | undefined; - entries: RedelegationEntryResponse[]; -} - -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface Pool { - notBondedTokens: string; - bondedTokens: string; -} - -const baseHistoricalInfo: object = {}; - -export const HistoricalInfo = { - encode(message: HistoricalInfo, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.valset) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HistoricalInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHistoricalInfo } as HistoricalInfo; - message.valset = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.valset.push(Validator.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HistoricalInfo { - const message = { ...baseHistoricalInfo } as HistoricalInfo; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HistoricalInfo): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - if (message.valset) { - obj.valset = message.valset.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.valset = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HistoricalInfo { - const message = { ...baseHistoricalInfo } as HistoricalInfo; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommissionRates: object = { - rate: "", - maxRate: "", - maxChangeRate: "", -}; - -export const CommissionRates = { - encode(message: CommissionRates, writer: Writer = Writer.create()): Writer { - if (message.rate !== "") { - writer.uint32(10).string(message.rate); - } - if (message.maxRate !== "") { - writer.uint32(18).string(message.maxRate); - } - if (message.maxChangeRate !== "") { - writer.uint32(26).string(message.maxChangeRate); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommissionRates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommissionRates } as CommissionRates; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rate = reader.string(); - break; - case 2: - message.maxRate = reader.string(); - break; - case 3: - message.maxChangeRate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommissionRates { - const message = { ...baseCommissionRates } as CommissionRates; - if (object.rate !== undefined && object.rate !== null) { - message.rate = String(object.rate); - } else { - message.rate = ""; - } - if (object.maxRate !== undefined && object.maxRate !== null) { - message.maxRate = String(object.maxRate); - } else { - message.maxRate = ""; - } - if (object.maxChangeRate !== undefined && object.maxChangeRate !== null) { - message.maxChangeRate = String(object.maxChangeRate); - } else { - message.maxChangeRate = ""; - } - return message; - }, - - toJSON(message: CommissionRates): unknown { - const obj: any = {}; - message.rate !== undefined && (obj.rate = message.rate); - message.maxRate !== undefined && (obj.maxRate = message.maxRate); - message.maxChangeRate !== undefined && - (obj.maxChangeRate = message.maxChangeRate); - return obj; - }, - - fromPartial(object: DeepPartial): CommissionRates { - const message = { ...baseCommissionRates } as CommissionRates; - if (object.rate !== undefined && object.rate !== null) { - message.rate = object.rate; - } else { - message.rate = ""; - } - if (object.maxRate !== undefined && object.maxRate !== null) { - message.maxRate = object.maxRate; - } else { - message.maxRate = ""; - } - if (object.maxChangeRate !== undefined && object.maxChangeRate !== null) { - message.maxChangeRate = object.maxChangeRate; - } else { - message.maxChangeRate = ""; - } - return message; - }, -}; - -const baseCommission: object = {}; - -export const Commission = { - encode(message: Commission, writer: Writer = Writer.create()): Writer { - if (message.commissionRates !== undefined) { - CommissionRates.encode( - message.commissionRates, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.updateTime !== undefined) { - Timestamp.encode( - toTimestamp(message.updateTime), - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commission { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommission } as Commission; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commissionRates = CommissionRates.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.updateTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commission { - const message = { ...baseCommission } as Commission; - if ( - object.commissionRates !== undefined && - object.commissionRates !== null - ) { - message.commissionRates = CommissionRates.fromJSON( - object.commissionRates - ); - } else { - message.commissionRates = undefined; - } - if (object.updateTime !== undefined && object.updateTime !== null) { - message.updateTime = fromJsonTimestamp(object.updateTime); - } else { - message.updateTime = undefined; - } - return message; - }, - - toJSON(message: Commission): unknown { - const obj: any = {}; - message.commissionRates !== undefined && - (obj.commissionRates = message.commissionRates - ? CommissionRates.toJSON(message.commissionRates) - : undefined); - message.updateTime !== undefined && - (obj.updateTime = - message.updateTime !== undefined - ? message.updateTime.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): Commission { - const message = { ...baseCommission } as Commission; - if ( - object.commissionRates !== undefined && - object.commissionRates !== null - ) { - message.commissionRates = CommissionRates.fromPartial( - object.commissionRates - ); - } else { - message.commissionRates = undefined; - } - if (object.updateTime !== undefined && object.updateTime !== null) { - message.updateTime = object.updateTime; - } else { - message.updateTime = undefined; - } - return message; - }, -}; - -const baseDescription: object = { - moniker: "", - identity: "", - website: "", - securityContact: "", - details: "", -}; - -export const Description = { - encode(message: Description, writer: Writer = Writer.create()): Writer { - if (message.moniker !== "") { - writer.uint32(10).string(message.moniker); - } - if (message.identity !== "") { - writer.uint32(18).string(message.identity); - } - if (message.website !== "") { - writer.uint32(26).string(message.website); - } - if (message.securityContact !== "") { - writer.uint32(34).string(message.securityContact); - } - if (message.details !== "") { - writer.uint32(42).string(message.details); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Description { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescription } as Description; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moniker = reader.string(); - break; - case 2: - message.identity = reader.string(); - break; - case 3: - message.website = reader.string(); - break; - case 4: - message.securityContact = reader.string(); - break; - case 5: - message.details = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Description { - const message = { ...baseDescription } as Description; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = String(object.moniker); - } else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = String(object.identity); - } else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = String(object.website); - } else { - message.website = ""; - } - if ( - object.securityContact !== undefined && - object.securityContact !== null - ) { - message.securityContact = String(object.securityContact); - } else { - message.securityContact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = String(object.details); - } else { - message.details = ""; - } - return message; - }, - - toJSON(message: Description): unknown { - const obj: any = {}; - message.moniker !== undefined && (obj.moniker = message.moniker); - message.identity !== undefined && (obj.identity = message.identity); - message.website !== undefined && (obj.website = message.website); - message.securityContact !== undefined && - (obj.securityContact = message.securityContact); - message.details !== undefined && (obj.details = message.details); - return obj; - }, - - fromPartial(object: DeepPartial): Description { - const message = { ...baseDescription } as Description; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = object.moniker; - } else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = object.identity; - } else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = object.website; - } else { - message.website = ""; - } - if ( - object.securityContact !== undefined && - object.securityContact !== null - ) { - message.securityContact = object.securityContact; - } else { - message.securityContact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = object.details; - } else { - message.details = ""; - } - return message; - }, -}; - -const baseValidator: object = { - operatorAddress: "", - jailed: false, - status: 0, - tokens: "", - delegatorShares: "", - unbondingHeight: 0, - minSelfDelegation: "", -}; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.operatorAddress !== "") { - writer.uint32(10).string(message.operatorAddress); - } - if (message.consensusPubkey !== undefined) { - Any.encode(message.consensusPubkey, writer.uint32(18).fork()).ldelim(); - } - if (message.jailed === true) { - writer.uint32(24).bool(message.jailed); - } - if (message.status !== 0) { - writer.uint32(32).int32(message.status); - } - if (message.tokens !== "") { - writer.uint32(42).string(message.tokens); - } - if (message.delegatorShares !== "") { - writer.uint32(50).string(message.delegatorShares); - } - if (message.description !== undefined) { - Description.encode( - message.description, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.unbondingHeight !== 0) { - writer.uint32(64).int64(message.unbondingHeight); - } - if (message.unbondingTime !== undefined) { - Timestamp.encode( - toTimestamp(message.unbondingTime), - writer.uint32(74).fork() - ).ldelim(); - } - if (message.commission !== undefined) { - Commission.encode(message.commission, writer.uint32(82).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(90).string(message.minSelfDelegation); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operatorAddress = reader.string(); - break; - case 2: - message.consensusPubkey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.jailed = reader.bool(); - break; - case 4: - message.status = reader.int32() as any; - break; - case 5: - message.tokens = reader.string(); - break; - case 6: - message.delegatorShares = reader.string(); - break; - case 7: - message.description = Description.decode(reader, reader.uint32()); - break; - case 8: - message.unbondingHeight = longToNumber(reader.int64() as Long); - break; - case 9: - message.unbondingTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 10: - message.commission = Commission.decode(reader, reader.uint32()); - break; - case 11: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if ( - object.operatorAddress !== undefined && - object.operatorAddress !== null - ) { - message.operatorAddress = String(object.operatorAddress); - } else { - message.operatorAddress = ""; - } - if ( - object.consensusPubkey !== undefined && - object.consensusPubkey !== null - ) { - message.consensusPubkey = Any.fromJSON(object.consensusPubkey); - } else { - message.consensusPubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = Boolean(object.jailed); - } else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = bondStatusFromJSON(object.status); - } else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = String(object.tokens); - } else { - message.tokens = ""; - } - if ( - object.delegatorShares !== undefined && - object.delegatorShares !== null - ) { - message.delegatorShares = String(object.delegatorShares); - } else { - message.delegatorShares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } else { - message.description = undefined; - } - if ( - object.unbondingHeight !== undefined && - object.unbondingHeight !== null - ) { - message.unbondingHeight = Number(object.unbondingHeight); - } else { - message.unbondingHeight = 0; - } - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = fromJsonTimestamp(object.unbondingTime); - } else { - message.unbondingTime = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromJSON(object.commission); - } else { - message.commission = undefined; - } - if ( - object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null - ) { - message.minSelfDelegation = String(object.minSelfDelegation); - } else { - message.minSelfDelegation = ""; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.operatorAddress !== undefined && - (obj.operatorAddress = message.operatorAddress); - message.consensusPubkey !== undefined && - (obj.consensusPubkey = message.consensusPubkey - ? Any.toJSON(message.consensusPubkey) - : undefined); - message.jailed !== undefined && (obj.jailed = message.jailed); - message.status !== undefined && - (obj.status = bondStatusToJSON(message.status)); - message.tokens !== undefined && (obj.tokens = message.tokens); - message.delegatorShares !== undefined && - (obj.delegatorShares = message.delegatorShares); - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.unbondingHeight !== undefined && - (obj.unbondingHeight = message.unbondingHeight); - message.unbondingTime !== undefined && - (obj.unbondingTime = - message.unbondingTime !== undefined - ? message.unbondingTime.toISOString() - : null); - message.commission !== undefined && - (obj.commission = message.commission - ? Commission.toJSON(message.commission) - : undefined); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if ( - object.operatorAddress !== undefined && - object.operatorAddress !== null - ) { - message.operatorAddress = object.operatorAddress; - } else { - message.operatorAddress = ""; - } - if ( - object.consensusPubkey !== undefined && - object.consensusPubkey !== null - ) { - message.consensusPubkey = Any.fromPartial(object.consensusPubkey); - } else { - message.consensusPubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = object.jailed; - } else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = object.tokens; - } else { - message.tokens = ""; - } - if ( - object.delegatorShares !== undefined && - object.delegatorShares !== null - ) { - message.delegatorShares = object.delegatorShares; - } else { - message.delegatorShares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } else { - message.description = undefined; - } - if ( - object.unbondingHeight !== undefined && - object.unbondingHeight !== null - ) { - message.unbondingHeight = object.unbondingHeight; - } else { - message.unbondingHeight = 0; - } - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = object.unbondingTime; - } else { - message.unbondingTime = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromPartial(object.commission); - } else { - message.commission = undefined; - } - if ( - object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null - ) { - message.minSelfDelegation = object.minSelfDelegation; - } else { - message.minSelfDelegation = ""; - } - return message; - }, -}; - -const baseValAddresses: object = { addresses: "" }; - -export const ValAddresses = { - encode(message: ValAddresses, writer: Writer = Writer.create()): Writer { - for (const v of message.addresses) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValAddresses { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValAddresses } as ValAddresses; - message.addresses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValAddresses { - const message = { ...baseValAddresses } as ValAddresses; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(String(e)); - } - } - return message; - }, - - toJSON(message: ValAddresses): unknown { - const obj: any = {}; - if (message.addresses) { - obj.addresses = message.addresses.map((e) => e); - } else { - obj.addresses = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValAddresses { - const message = { ...baseValAddresses } as ValAddresses; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(e); - } - } - return message; - }, -}; - -const baseDVPair: object = { delegatorAddress: "", validatorAddress: "" }; - -export const DVPair = { - encode(message: DVPair, writer: Writer = Writer.create()): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVPair { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPair } as DVPair; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVPair { - const message = { ...baseDVPair } as DVPair; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - return message; - }, - - toJSON(message: DVPair): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - - fromPartial(object: DeepPartial): DVPair { - const message = { ...baseDVPair } as DVPair; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - return message; - }, -}; - -const baseDVPairs: object = {}; - -export const DVPairs = { - encode(message: DVPairs, writer: Writer = Writer.create()): Writer { - for (const v of message.pairs) { - DVPair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVPairs { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPairs } as DVPairs; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(DVPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVPairs { - const message = { ...baseDVPairs } as DVPairs; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: DVPairs): unknown { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined)); - } else { - obj.pairs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DVPairs { - const message = { ...baseDVPairs } as DVPairs; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDVVTriplet: object = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; - -export const DVVTriplet = { - encode(message: DVVTriplet, writer: Writer = Writer.create()): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVVTriplet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplet } as DVVTriplet; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVVTriplet { - const message = { ...baseDVVTriplet } as DVVTriplet; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null - ) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } else { - message.validatorSrcAddress = ""; - } - if ( - object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null - ) { - message.validatorDstAddress = String(object.validatorDstAddress); - } else { - message.validatorDstAddress = ""; - } - return message; - }, - - toJSON(message: DVVTriplet): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - return obj; - }, - - fromPartial(object: DeepPartial): DVVTriplet { - const message = { ...baseDVVTriplet } as DVVTriplet; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null - ) { - message.validatorSrcAddress = object.validatorSrcAddress; - } else { - message.validatorSrcAddress = ""; - } - if ( - object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null - ) { - message.validatorDstAddress = object.validatorDstAddress; - } else { - message.validatorDstAddress = ""; - } - return message; - }, -}; - -const baseDVVTriplets: object = {}; - -export const DVVTriplets = { - encode(message: DVVTriplets, writer: Writer = Writer.create()): Writer { - for (const v of message.triplets) { - DVVTriplet.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVVTriplets { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplets } as DVVTriplets; - message.triplets = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVVTriplets { - const message = { ...baseDVVTriplets } as DVVTriplets; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: DVVTriplets): unknown { - const obj: any = {}; - if (message.triplets) { - obj.triplets = message.triplets.map((e) => - e ? DVVTriplet.toJSON(e) : undefined - ); - } else { - obj.triplets = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DVVTriplets { - const message = { ...baseDVVTriplets } as DVVTriplets; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDelegation: object = { - delegatorAddress: "", - validatorAddress: "", - shares: "", -}; - -export const Delegation = { - encode(message: Delegation, writer: Writer = Writer.create()): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.shares !== "") { - writer.uint32(26).string(message.shares); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Delegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegation } as Delegation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.shares = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Delegation { - const message = { ...baseDelegation } as Delegation; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = String(object.shares); - } else { - message.shares = ""; - } - return message; - }, - - toJSON(message: Delegation): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.shares !== undefined && (obj.shares = message.shares); - return obj; - }, - - fromPartial(object: DeepPartial): Delegation { - const message = { ...baseDelegation } as Delegation; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = object.shares; - } else { - message.shares = ""; - } - return message; - }, -}; - -const baseUnbondingDelegation: object = { - delegatorAddress: "", - validatorAddress: "", -}; - -export const UnbondingDelegation = { - encode( - message: UnbondingDelegation, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - for (const v of message.entries) { - UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UnbondingDelegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUnbondingDelegation } as UnbondingDelegation; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.entries.push( - UnbondingDelegationEntry.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UnbondingDelegation { - const message = { ...baseUnbondingDelegation } as UnbondingDelegation; - message.entries = []; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: UnbondingDelegation): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? UnbondingDelegationEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): UnbondingDelegation { - const message = { ...baseUnbondingDelegation } as UnbondingDelegation; - message.entries = []; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUnbondingDelegationEntry: object = { - creationHeight: 0, - initialBalance: "", - balance: "", -}; - -export const UnbondingDelegationEntry = { - encode( - message: UnbondingDelegationEntry, - writer: Writer = Writer.create() - ): Writer { - if (message.creationHeight !== 0) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode( - toTimestamp(message.completionTime), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UnbondingDelegationEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUnbondingDelegationEntry, - } as UnbondingDelegationEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = longToNumber(reader.int64() as Long); - break; - case 2: - message.completionTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UnbondingDelegationEntry { - const message = { - ...baseUnbondingDelegationEntry, - } as UnbondingDelegationEntry; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = Number(object.creationHeight); - } else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = String(object.initialBalance); - } else { - message.initialBalance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } else { - message.balance = ""; - } - return message; - }, - - toJSON(message: UnbondingDelegationEntry): unknown { - const obj: any = {}; - message.creationHeight !== undefined && - (obj.creationHeight = message.creationHeight); - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - message.initialBalance !== undefined && - (obj.initialBalance = message.initialBalance); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UnbondingDelegationEntry { - const message = { - ...baseUnbondingDelegationEntry, - } as UnbondingDelegationEntry; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = object.creationHeight; - } else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = object.initialBalance; - } else { - message.initialBalance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } else { - message.balance = ""; - } - return message; - }, -}; - -const baseRedelegationEntry: object = { - creationHeight: 0, - initialBalance: "", - sharesDst: "", -}; - -export const RedelegationEntry = { - encode(message: RedelegationEntry, writer: Writer = Writer.create()): Writer { - if (message.creationHeight !== 0) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode( - toTimestamp(message.completionTime), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.sharesDst !== "") { - writer.uint32(34).string(message.sharesDst); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RedelegationEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationEntry } as RedelegationEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = longToNumber(reader.int64() as Long); - break; - case 2: - message.completionTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.sharesDst = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RedelegationEntry { - const message = { ...baseRedelegationEntry } as RedelegationEntry; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = Number(object.creationHeight); - } else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = String(object.initialBalance); - } else { - message.initialBalance = ""; - } - if (object.sharesDst !== undefined && object.sharesDst !== null) { - message.sharesDst = String(object.sharesDst); - } else { - message.sharesDst = ""; - } - return message; - }, - - toJSON(message: RedelegationEntry): unknown { - const obj: any = {}; - message.creationHeight !== undefined && - (obj.creationHeight = message.creationHeight); - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - message.initialBalance !== undefined && - (obj.initialBalance = message.initialBalance); - message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst); - return obj; - }, - - fromPartial(object: DeepPartial): RedelegationEntry { - const message = { ...baseRedelegationEntry } as RedelegationEntry; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = object.creationHeight; - } else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = object.initialBalance; - } else { - message.initialBalance = ""; - } - if (object.sharesDst !== undefined && object.sharesDst !== null) { - message.sharesDst = object.sharesDst; - } else { - message.sharesDst = ""; - } - return message; - }, -}; - -const baseRedelegation: object = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; - -export const Redelegation = { - encode(message: Redelegation, writer: Writer = Writer.create()): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - for (const v of message.entries) { - RedelegationEntry.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Redelegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegation } as Redelegation; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.entries.push( - RedelegationEntry.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Redelegation { - const message = { ...baseRedelegation } as Redelegation; - message.entries = []; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null - ) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } else { - message.validatorSrcAddress = ""; - } - if ( - object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null - ) { - message.validatorDstAddress = String(object.validatorDstAddress); - } else { - message.validatorDstAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Redelegation): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? RedelegationEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Redelegation { - const message = { ...baseRedelegation } as Redelegation; - message.entries = []; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null - ) { - message.validatorSrcAddress = object.validatorSrcAddress; - } else { - message.validatorSrcAddress = ""; - } - if ( - object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null - ) { - message.validatorDstAddress = object.validatorDstAddress; - } else { - message.validatorDstAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; - -const baseParams: object = { - maxValidators: 0, - maxEntries: 0, - historicalEntries: 0, - bondDenom: "", -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.unbondingTime !== undefined) { - Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim(); - } - if (message.maxValidators !== 0) { - writer.uint32(16).uint32(message.maxValidators); - } - if (message.maxEntries !== 0) { - writer.uint32(24).uint32(message.maxEntries); - } - if (message.historicalEntries !== 0) { - writer.uint32(32).uint32(message.historicalEntries); - } - if (message.bondDenom !== "") { - writer.uint32(42).string(message.bondDenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingTime = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.maxValidators = reader.uint32(); - break; - case 3: - message.maxEntries = reader.uint32(); - break; - case 4: - message.historicalEntries = reader.uint32(); - break; - case 5: - message.bondDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = Duration.fromJSON(object.unbondingTime); - } else { - message.unbondingTime = undefined; - } - if (object.maxValidators !== undefined && object.maxValidators !== null) { - message.maxValidators = Number(object.maxValidators); - } else { - message.maxValidators = 0; - } - if (object.maxEntries !== undefined && object.maxEntries !== null) { - message.maxEntries = Number(object.maxEntries); - } else { - message.maxEntries = 0; - } - if ( - object.historicalEntries !== undefined && - object.historicalEntries !== null - ) { - message.historicalEntries = Number(object.historicalEntries); - } else { - message.historicalEntries = 0; - } - if (object.bondDenom !== undefined && object.bondDenom !== null) { - message.bondDenom = String(object.bondDenom); - } else { - message.bondDenom = ""; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.unbondingTime !== undefined && - (obj.unbondingTime = message.unbondingTime - ? Duration.toJSON(message.unbondingTime) - : undefined); - message.maxValidators !== undefined && - (obj.maxValidators = message.maxValidators); - message.maxEntries !== undefined && (obj.maxEntries = message.maxEntries); - message.historicalEntries !== undefined && - (obj.historicalEntries = message.historicalEntries); - message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = Duration.fromPartial(object.unbondingTime); - } else { - message.unbondingTime = undefined; - } - if (object.maxValidators !== undefined && object.maxValidators !== null) { - message.maxValidators = object.maxValidators; - } else { - message.maxValidators = 0; - } - if (object.maxEntries !== undefined && object.maxEntries !== null) { - message.maxEntries = object.maxEntries; - } else { - message.maxEntries = 0; - } - if ( - object.historicalEntries !== undefined && - object.historicalEntries !== null - ) { - message.historicalEntries = object.historicalEntries; - } else { - message.historicalEntries = 0; - } - if (object.bondDenom !== undefined && object.bondDenom !== null) { - message.bondDenom = object.bondDenom; - } else { - message.bondDenom = ""; - } - return message; - }, -}; - -const baseDelegationResponse: object = {}; - -export const DelegationResponse = { - encode( - message: DelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.delegation !== undefined) { - Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegationResponse } as DelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation = Delegation.decode(reader, reader.uint32()); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegationResponse { - const message = { ...baseDelegationResponse } as DelegationResponse; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromJSON(object.delegation); - } else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } else { - message.balance = undefined; - } - return message; - }, - - toJSON(message: DelegationResponse): unknown { - const obj: any = {}; - message.delegation !== undefined && - (obj.delegation = message.delegation - ? Delegation.toJSON(message.delegation) - : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): DelegationResponse { - const message = { ...baseDelegationResponse } as DelegationResponse; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromPartial(object.delegation); - } else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } else { - message.balance = undefined; - } - return message; - }, -}; - -const baseRedelegationEntryResponse: object = { balance: "" }; - -export const RedelegationEntryResponse = { - encode( - message: RedelegationEntryResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.redelegationEntry !== undefined) { - RedelegationEntry.encode( - message.redelegationEntry, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RedelegationEntryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRedelegationEntryResponse, - } as RedelegationEntryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationEntry = RedelegationEntry.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RedelegationEntryResponse { - const message = { - ...baseRedelegationEntryResponse, - } as RedelegationEntryResponse; - if ( - object.redelegationEntry !== undefined && - object.redelegationEntry !== null - ) { - message.redelegationEntry = RedelegationEntry.fromJSON( - object.redelegationEntry - ); - } else { - message.redelegationEntry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } else { - message.balance = ""; - } - return message; - }, - - toJSON(message: RedelegationEntryResponse): unknown { - const obj: any = {}; - message.redelegationEntry !== undefined && - (obj.redelegationEntry = message.redelegationEntry - ? RedelegationEntry.toJSON(message.redelegationEntry) - : undefined); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RedelegationEntryResponse { - const message = { - ...baseRedelegationEntryResponse, - } as RedelegationEntryResponse; - if ( - object.redelegationEntry !== undefined && - object.redelegationEntry !== null - ) { - message.redelegationEntry = RedelegationEntry.fromPartial( - object.redelegationEntry - ); - } else { - message.redelegationEntry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } else { - message.balance = ""; - } - return message; - }, -}; - -const baseRedelegationResponse: object = {}; - -export const RedelegationResponse = { - encode( - message: RedelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.redelegation !== undefined) { - Redelegation.encode( - message.redelegation, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.entries) { - RedelegationEntryResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RedelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationResponse } as RedelegationResponse; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation = Redelegation.decode(reader, reader.uint32()); - break; - case 2: - message.entries.push( - RedelegationEntryResponse.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RedelegationResponse { - const message = { ...baseRedelegationResponse } as RedelegationResponse; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromJSON(object.redelegation); - } else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: RedelegationResponse): unknown { - const obj: any = {}; - message.redelegation !== undefined && - (obj.redelegation = message.redelegation - ? Redelegation.toJSON(message.redelegation) - : undefined); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? RedelegationEntryResponse.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): RedelegationResponse { - const message = { ...baseRedelegationResponse } as RedelegationResponse; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromPartial(object.redelegation); - } else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromPartial(e)); - } - } - return message; - }, -}; - -const basePool: object = { notBondedTokens: "", bondedTokens: "" }; - -export const Pool = { - encode(message: Pool, writer: Writer = Writer.create()): Writer { - if (message.notBondedTokens !== "") { - writer.uint32(10).string(message.notBondedTokens); - } - if (message.bondedTokens !== "") { - writer.uint32(18).string(message.bondedTokens); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Pool { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePool } as Pool; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notBondedTokens = reader.string(); - break; - case 2: - message.bondedTokens = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Pool { - const message = { ...basePool } as Pool; - if ( - object.notBondedTokens !== undefined && - object.notBondedTokens !== null - ) { - message.notBondedTokens = String(object.notBondedTokens); - } else { - message.notBondedTokens = ""; - } - if (object.bondedTokens !== undefined && object.bondedTokens !== null) { - message.bondedTokens = String(object.bondedTokens); - } else { - message.bondedTokens = ""; - } - return message; - }, - - toJSON(message: Pool): unknown { - const obj: any = {}; - message.notBondedTokens !== undefined && - (obj.notBondedTokens = message.notBondedTokens); - message.bondedTokens !== undefined && - (obj.bondedTokens = message.bondedTokens); - return obj; - }, - - fromPartial(object: DeepPartial): Pool { - const message = { ...basePool } as Pool; - if ( - object.notBondedTokens !== undefined && - object.notBondedTokens !== null - ) { - message.notBondedTokens = object.notBondedTokens; - } else { - message.notBondedTokens = ""; - } - if (object.bondedTokens !== undefined && object.bondedTokens !== null) { - message.bondedTokens = object.bondedTokens; - } else { - message.bondedTokens = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts deleted file mode 100644 index 8eb1d1d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Description, CommissionRates } from "../../../cosmos/staking/v1beta1/staking"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidator { - description: Description | undefined; - commission: CommissionRates | undefined; - minSelfDelegation: string; - delegatorAddress: string; - validatorAddress: string; - pubkey: Any | undefined; - value: Coin | undefined; -} -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponse { -} -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidator { - description: Description | undefined; - validatorAddress: string; - /** - * We pass a reference to the new commission rate and min self delegation as - * it's not mandatory to update. If not updated, the deserialized rate will be - * zero with no way to distinguish if an update was intended. - * REF: #2373 - */ - commissionRate: string; - minSelfDelegation: string; -} -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponse { -} -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponse { -} -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegate { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; - amount: Coin | undefined; -} -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponse { - completionTime: Date | undefined; -} -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponse { - completionTime: Date | undefined; -} -export declare const MsgCreateValidator: { - encode(message: MsgCreateValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateValidator; - fromJSON(object: any): MsgCreateValidator; - toJSON(message: MsgCreateValidator): unknown; - fromPartial(object: DeepPartial): MsgCreateValidator; -}; -export declare const MsgCreateValidatorResponse: { - encode(_: MsgCreateValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateValidatorResponse; - fromJSON(_: any): MsgCreateValidatorResponse; - toJSON(_: MsgCreateValidatorResponse): unknown; - fromPartial(_: DeepPartial): MsgCreateValidatorResponse; -}; -export declare const MsgEditValidator: { - encode(message: MsgEditValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgEditValidator; - fromJSON(object: any): MsgEditValidator; - toJSON(message: MsgEditValidator): unknown; - fromPartial(object: DeepPartial): MsgEditValidator; -}; -export declare const MsgEditValidatorResponse: { - encode(_: MsgEditValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgEditValidatorResponse; - fromJSON(_: any): MsgEditValidatorResponse; - toJSON(_: MsgEditValidatorResponse): unknown; - fromPartial(_: DeepPartial): MsgEditValidatorResponse; -}; -export declare const MsgDelegate: { - encode(message: MsgDelegate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDelegate; - fromJSON(object: any): MsgDelegate; - toJSON(message: MsgDelegate): unknown; - fromPartial(object: DeepPartial): MsgDelegate; -}; -export declare const MsgDelegateResponse: { - encode(_: MsgDelegateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDelegateResponse; - fromJSON(_: any): MsgDelegateResponse; - toJSON(_: MsgDelegateResponse): unknown; - fromPartial(_: DeepPartial): MsgDelegateResponse; -}; -export declare const MsgBeginRedelegate: { - encode(message: MsgBeginRedelegate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgBeginRedelegate; - fromJSON(object: any): MsgBeginRedelegate; - toJSON(message: MsgBeginRedelegate): unknown; - fromPartial(object: DeepPartial): MsgBeginRedelegate; -}; -export declare const MsgBeginRedelegateResponse: { - encode(message: MsgBeginRedelegateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgBeginRedelegateResponse; - fromJSON(object: any): MsgBeginRedelegateResponse; - toJSON(message: MsgBeginRedelegateResponse): unknown; - fromPartial(object: DeepPartial): MsgBeginRedelegateResponse; -}; -export declare const MsgUndelegate: { - encode(message: MsgUndelegate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUndelegate; - fromJSON(object: any): MsgUndelegate; - toJSON(message: MsgUndelegate): unknown; - fromPartial(object: DeepPartial): MsgUndelegate; -}; -export declare const MsgUndelegateResponse: { - encode(message: MsgUndelegateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUndelegateResponse; - fromJSON(object: any): MsgUndelegateResponse; - toJSON(message: MsgUndelegateResponse): unknown; - fromPartial(object: DeepPartial): MsgUndelegateResponse; -}; -/** Msg defines the staking Msg service. */ -export interface Msg { - /** CreateValidator defines a method for creating a new validator. */ - CreateValidator(request: MsgCreateValidator): Promise; - /** EditValidator defines a method for editing an existing validator. */ - EditValidator(request: MsgEditValidator): Promise; - /** - * Delegate defines a method for performing a delegation of coins - * from a delegator to a validator. - */ - Delegate(request: MsgDelegate): Promise; - /** - * BeginRedelegate defines a method for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ - BeginRedelegate(request: MsgBeginRedelegate): Promise; - /** - * Undelegate defines a method for performing an undelegation from a - * delegate and a validator. - */ - Undelegate(request: MsgUndelegate): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - CreateValidator(request: MsgCreateValidator): Promise; - EditValidator(request: MsgEditValidator): Promise; - Delegate(request: MsgDelegate): Promise; - BeginRedelegate(request: MsgBeginRedelegate): Promise; - Undelegate(request: MsgUndelegate): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js deleted file mode 100644 index fe3cb79..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js +++ /dev/null @@ -1,907 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Description, CommissionRates, } from "../../../cosmos/staking/v1beta1/staking"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.staking.v1beta1"; -const baseMsgCreateValidator = { - minSelfDelegation: "", - delegatorAddress: "", - validatorAddress: "", -}; -export const MsgCreateValidator = { - encode(message, writer = Writer.create()) { - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(10).fork()).ldelim(); - } - if (message.commission !== undefined) { - CommissionRates.encode(message.commission, writer.uint32(18).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(26).string(message.minSelfDelegation); - } - if (message.delegatorAddress !== "") { - writer.uint32(34).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(42).string(message.validatorAddress); - } - if (message.pubkey !== undefined) { - Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim(); - } - if (message.value !== undefined) { - Coin.encode(message.value, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.commission = CommissionRates.decode(reader, reader.uint32()); - break; - case 3: - message.minSelfDelegation = reader.string(); - break; - case 4: - message.delegatorAddress = reader.string(); - break; - case 5: - message.validatorAddress = reader.string(); - break; - case 6: - message.pubkey = Any.decode(reader, reader.uint32()); - break; - case 7: - message.value = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgCreateValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } - else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromJSON(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = String(object.minSelfDelegation); - } - else { - message.minSelfDelegation = ""; - } - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromJSON(object.pubkey); - } - else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromJSON(object.value); - } - else { - message.value = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.commission !== undefined && - (obj.commission = message.commission - ? CommissionRates.toJSON(message.commission) - : undefined); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.pubkey !== undefined && - (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined); - message.value !== undefined && - (obj.value = message.value ? Coin.toJSON(message.value) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgCreateValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } - else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromPartial(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = object.minSelfDelegation; - } - else { - message.minSelfDelegation = ""; - } - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromPartial(object.pubkey); - } - else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromPartial(object.value); - } - else { - message.value = undefined; - } - return message; - }, -}; -const baseMsgCreateValidatorResponse = {}; -export const MsgCreateValidatorResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateValidatorResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgCreateValidatorResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgCreateValidatorResponse, - }; - return message; - }, -}; -const baseMsgEditValidator = { - validatorAddress: "", - commissionRate: "", - minSelfDelegation: "", -}; -export const MsgEditValidator = { - encode(message, writer = Writer.create()) { - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.commissionRate !== "") { - writer.uint32(26).string(message.commissionRate); - } - if (message.minSelfDelegation !== "") { - writer.uint32(34).string(message.minSelfDelegation); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgEditValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.commissionRate = reader.string(); - break; - case 4: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgEditValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } - else { - message.description = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.commissionRate !== undefined && object.commissionRate !== null) { - message.commissionRate = String(object.commissionRate); - } - else { - message.commissionRate = ""; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = String(object.minSelfDelegation); - } - else { - message.minSelfDelegation = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.commissionRate !== undefined && - (obj.commissionRate = message.commissionRate); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgEditValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } - else { - message.description = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.commissionRate !== undefined && object.commissionRate !== null) { - message.commissionRate = object.commissionRate; - } - else { - message.commissionRate = ""; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = object.minSelfDelegation; - } - else { - message.minSelfDelegation = ""; - } - return message; - }, -}; -const baseMsgEditValidatorResponse = {}; -export const MsgEditValidatorResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgEditValidatorResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgEditValidatorResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgEditValidatorResponse, - }; - return message; - }, -}; -const baseMsgDelegate = { delegatorAddress: "", validatorAddress: "" }; -export const MsgDelegate = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgDelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgDelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgDelegateResponse = {}; -export const MsgDelegateResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegateResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgDelegateResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgDelegateResponse }; - return message; - }, -}; -const baseMsgBeginRedelegate = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; -export const MsgBeginRedelegate = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBeginRedelegate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgBeginRedelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = String(object.validatorDstAddress); - } - else { - message.validatorDstAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgBeginRedelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = object.validatorSrcAddress; - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = object.validatorDstAddress; - } - else { - message.validatorDstAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgBeginRedelegateResponse = {}; -export const MsgBeginRedelegateResponse = { - encode(message, writer = Writer.create()) { - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgBeginRedelegateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgBeginRedelegateResponse, - }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgBeginRedelegateResponse, - }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - return message; - }, -}; -const baseMsgUndelegate = { - delegatorAddress: "", - validatorAddress: "", -}; -export const MsgUndelegate = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUndelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUndelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgUndelegateResponse = {}; -export const MsgUndelegateResponse = { - encode(message, writer = Writer.create()) { - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegateResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUndelegateResponse }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUndelegateResponse }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - CreateValidator(request) { - const data = MsgCreateValidator.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "CreateValidator", data); - return promise.then((data) => MsgCreateValidatorResponse.decode(new Reader(data))); - } - EditValidator(request) { - const data = MsgEditValidator.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "EditValidator", data); - return promise.then((data) => MsgEditValidatorResponse.decode(new Reader(data))); - } - Delegate(request) { - const data = MsgDelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "Delegate", data); - return promise.then((data) => MsgDelegateResponse.decode(new Reader(data))); - } - BeginRedelegate(request) { - const data = MsgBeginRedelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "BeginRedelegate", data); - return promise.then((data) => MsgBeginRedelegateResponse.decode(new Reader(data))); - } - Undelegate(request) { - const data = MsgUndelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "Undelegate", data); - return promise.then((data) => MsgUndelegateResponse.decode(new Reader(data))); - } -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts deleted file mode 100644 index a165d55..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts +++ /dev/null @@ -1,1187 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { - Description, - CommissionRates, -} from "../../../cosmos/staking/v1beta1/staking"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidator { - description: Description | undefined; - commission: CommissionRates | undefined; - minSelfDelegation: string; - delegatorAddress: string; - validatorAddress: string; - pubkey: Any | undefined; - value: Coin | undefined; -} - -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponse {} - -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidator { - description: Description | undefined; - validatorAddress: string; - /** - * We pass a reference to the new commission rate and min self delegation as - * it's not mandatory to update. If not updated, the deserialized rate will be - * zero with no way to distinguish if an update was intended. - * REF: #2373 - */ - commissionRate: string; - minSelfDelegation: string; -} - -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponse {} - -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} - -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponse {} - -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegate { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; - amount: Coin | undefined; -} - -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponse { - completionTime: Date | undefined; -} - -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} - -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponse { - completionTime: Date | undefined; -} - -const baseMsgCreateValidator: object = { - minSelfDelegation: "", - delegatorAddress: "", - validatorAddress: "", -}; - -export const MsgCreateValidator = { - encode( - message: MsgCreateValidator, - writer: Writer = Writer.create() - ): Writer { - if (message.description !== undefined) { - Description.encode( - message.description, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.commission !== undefined) { - CommissionRates.encode( - message.commission, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(26).string(message.minSelfDelegation); - } - if (message.delegatorAddress !== "") { - writer.uint32(34).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(42).string(message.validatorAddress); - } - if (message.pubkey !== undefined) { - Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim(); - } - if (message.value !== undefined) { - Coin.encode(message.value, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateValidator } as MsgCreateValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.commission = CommissionRates.decode(reader, reader.uint32()); - break; - case 3: - message.minSelfDelegation = reader.string(); - break; - case 4: - message.delegatorAddress = reader.string(); - break; - case 5: - message.validatorAddress = reader.string(); - break; - case 6: - message.pubkey = Any.decode(reader, reader.uint32()); - break; - case 7: - message.value = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateValidator { - const message = { ...baseMsgCreateValidator } as MsgCreateValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromJSON(object.commission); - } else { - message.commission = undefined; - } - if ( - object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null - ) { - message.minSelfDelegation = String(object.minSelfDelegation); - } else { - message.minSelfDelegation = ""; - } - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromJSON(object.pubkey); - } else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromJSON(object.value); - } else { - message.value = undefined; - } - return message; - }, - - toJSON(message: MsgCreateValidator): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.commission !== undefined && - (obj.commission = message.commission - ? CommissionRates.toJSON(message.commission) - : undefined); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.pubkey !== undefined && - (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined); - message.value !== undefined && - (obj.value = message.value ? Coin.toJSON(message.value) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgCreateValidator { - const message = { ...baseMsgCreateValidator } as MsgCreateValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromPartial(object.commission); - } else { - message.commission = undefined; - } - if ( - object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null - ) { - message.minSelfDelegation = object.minSelfDelegation; - } else { - message.minSelfDelegation = ""; - } - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromPartial(object.pubkey); - } else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromPartial(object.value); - } else { - message.value = undefined; - } - return message; - }, -}; - -const baseMsgCreateValidatorResponse: object = {}; - -export const MsgCreateValidatorResponse = { - encode( - _: MsgCreateValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgCreateValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateValidatorResponse, - } as MsgCreateValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreateValidatorResponse { - const message = { - ...baseMsgCreateValidatorResponse, - } as MsgCreateValidatorResponse; - return message; - }, - - toJSON(_: MsgCreateValidatorResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCreateValidatorResponse { - const message = { - ...baseMsgCreateValidatorResponse, - } as MsgCreateValidatorResponse; - return message; - }, -}; - -const baseMsgEditValidator: object = { - validatorAddress: "", - commissionRate: "", - minSelfDelegation: "", -}; - -export const MsgEditValidator = { - encode(message: MsgEditValidator, writer: Writer = Writer.create()): Writer { - if (message.description !== undefined) { - Description.encode( - message.description, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.commissionRate !== "") { - writer.uint32(26).string(message.commissionRate); - } - if (message.minSelfDelegation !== "") { - writer.uint32(34).string(message.minSelfDelegation); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgEditValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgEditValidator } as MsgEditValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.commissionRate = reader.string(); - break; - case 4: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgEditValidator { - const message = { ...baseMsgEditValidator } as MsgEditValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } else { - message.description = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.commissionRate !== undefined && object.commissionRate !== null) { - message.commissionRate = String(object.commissionRate); - } else { - message.commissionRate = ""; - } - if ( - object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null - ) { - message.minSelfDelegation = String(object.minSelfDelegation); - } else { - message.minSelfDelegation = ""; - } - return message; - }, - - toJSON(message: MsgEditValidator): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.commissionRate !== undefined && - (obj.commissionRate = message.commissionRate); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - - fromPartial(object: DeepPartial): MsgEditValidator { - const message = { ...baseMsgEditValidator } as MsgEditValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } else { - message.description = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.commissionRate !== undefined && object.commissionRate !== null) { - message.commissionRate = object.commissionRate; - } else { - message.commissionRate = ""; - } - if ( - object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null - ) { - message.minSelfDelegation = object.minSelfDelegation; - } else { - message.minSelfDelegation = ""; - } - return message; - }, -}; - -const baseMsgEditValidatorResponse: object = {}; - -export const MsgEditValidatorResponse = { - encode( - _: MsgEditValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgEditValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgEditValidatorResponse, - } as MsgEditValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgEditValidatorResponse { - const message = { - ...baseMsgEditValidatorResponse, - } as MsgEditValidatorResponse; - return message; - }, - - toJSON(_: MsgEditValidatorResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgEditValidatorResponse { - const message = { - ...baseMsgEditValidatorResponse, - } as MsgEditValidatorResponse; - return message; - }, -}; - -const baseMsgDelegate: object = { delegatorAddress: "", validatorAddress: "" }; - -export const MsgDelegate = { - encode(message: MsgDelegate, writer: Writer = Writer.create()): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDelegate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegate } as MsgDelegate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgDelegate { - const message = { ...baseMsgDelegate } as MsgDelegate; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgDelegate): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgDelegate { - const message = { ...baseMsgDelegate } as MsgDelegate; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgDelegateResponse: object = {}; - -export const MsgDelegateResponse = { - encode(_: MsgDelegateResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDelegateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgDelegateResponse { - const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse; - return message; - }, - - toJSON(_: MsgDelegateResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgDelegateResponse { - const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse; - return message; - }, -}; - -const baseMsgBeginRedelegate: object = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; - -export const MsgBeginRedelegate = { - encode( - message: MsgBeginRedelegate, - writer: Writer = Writer.create() - ): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgBeginRedelegate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgBeginRedelegate { - const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null - ) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } else { - message.validatorSrcAddress = ""; - } - if ( - object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null - ) { - message.validatorDstAddress = String(object.validatorDstAddress); - } else { - message.validatorDstAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgBeginRedelegate): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgBeginRedelegate { - const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null - ) { - message.validatorSrcAddress = object.validatorSrcAddress; - } else { - message.validatorSrcAddress = ""; - } - if ( - object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null - ) { - message.validatorDstAddress = object.validatorDstAddress; - } else { - message.validatorDstAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgBeginRedelegateResponse: object = {}; - -export const MsgBeginRedelegateResponse = { - encode( - message: MsgBeginRedelegateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.completionTime !== undefined) { - Timestamp.encode( - toTimestamp(message.completionTime), - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgBeginRedelegateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgBeginRedelegateResponse, - } as MsgBeginRedelegateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgBeginRedelegateResponse { - const message = { - ...baseMsgBeginRedelegateResponse, - } as MsgBeginRedelegateResponse; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } else { - message.completionTime = undefined; - } - return message; - }, - - toJSON(message: MsgBeginRedelegateResponse): unknown { - const obj: any = {}; - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgBeginRedelegateResponse { - const message = { - ...baseMsgBeginRedelegateResponse, - } as MsgBeginRedelegateResponse; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } else { - message.completionTime = undefined; - } - return message; - }, -}; - -const baseMsgUndelegate: object = { - delegatorAddress: "", - validatorAddress: "", -}; - -export const MsgUndelegate = { - encode(message: MsgUndelegate, writer: Writer = Writer.create()): Writer { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUndelegate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegate } as MsgUndelegate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUndelegate { - const message = { ...baseMsgUndelegate } as MsgUndelegate; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = String(object.delegatorAddress); - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = String(object.validatorAddress); - } else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgUndelegate): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUndelegate { - const message = { ...baseMsgUndelegate } as MsgUndelegate; - if ( - object.delegatorAddress !== undefined && - object.delegatorAddress !== null - ) { - message.delegatorAddress = object.delegatorAddress; - } else { - message.delegatorAddress = ""; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgUndelegateResponse: object = {}; - -export const MsgUndelegateResponse = { - encode( - message: MsgUndelegateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.completionTime !== undefined) { - Timestamp.encode( - toTimestamp(message.completionTime), - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUndelegateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUndelegateResponse { - const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } else { - message.completionTime = undefined; - } - return message; - }, - - toJSON(message: MsgUndelegateResponse): unknown { - const obj: any = {}; - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgUndelegateResponse { - const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } else { - message.completionTime = undefined; - } - return message; - }, -}; - -/** Msg defines the staking Msg service. */ -export interface Msg { - /** CreateValidator defines a method for creating a new validator. */ - CreateValidator( - request: MsgCreateValidator - ): Promise; - /** EditValidator defines a method for editing an existing validator. */ - EditValidator(request: MsgEditValidator): Promise; - /** - * Delegate defines a method for performing a delegation of coins - * from a delegator to a validator. - */ - Delegate(request: MsgDelegate): Promise; - /** - * BeginRedelegate defines a method for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ - BeginRedelegate( - request: MsgBeginRedelegate - ): Promise; - /** - * Undelegate defines a method for performing an undelegation from a - * delegate and a validator. - */ - Undelegate(request: MsgUndelegate): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateValidator( - request: MsgCreateValidator - ): Promise { - const data = MsgCreateValidator.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "CreateValidator", - data - ); - return promise.then((data) => - MsgCreateValidatorResponse.decode(new Reader(data)) - ); - } - - EditValidator(request: MsgEditValidator): Promise { - const data = MsgEditValidator.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "EditValidator", - data - ); - return promise.then((data) => - MsgEditValidatorResponse.decode(new Reader(data)) - ); - } - - Delegate(request: MsgDelegate): Promise { - const data = MsgDelegate.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "Delegate", - data - ); - return promise.then((data) => MsgDelegateResponse.decode(new Reader(data))); - } - - BeginRedelegate( - request: MsgBeginRedelegate - ): Promise { - const data = MsgBeginRedelegate.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "BeginRedelegate", - data - ); - return promise.then((data) => - MsgBeginRedelegateResponse.decode(new Reader(data)) - ); - } - - Undelegate(request: MsgUndelegate): Promise { - const data = MsgUndelegate.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "Undelegate", - data - ); - return promise.then((data) => - MsgUndelegateResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index b586045..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556fa..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index f67058a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 82af3da..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 52a7265..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts deleted file mode 100644 index 8fa5bdc..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} -export declare const PublicKey: { - encode(message: PublicKey, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PublicKey; - fromJSON(object: any): PublicKey; - toJSON(message: PublicKey): unknown; - fromPartial(object: DeepPartial): PublicKey; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js deleted file mode 100644 index bbd03cb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js +++ /dev/null @@ -1,105 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const basePublicKey = {}; -export const PublicKey = { - encode(message, writer = Writer.create()) { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } - else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } - else { - message.secp256k1 = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts deleted file mode 100644 index 450db2a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} - -const basePublicKey: object = {}; - -export const PublicKey = { - encode(message: PublicKey, writer: Writer = Writer.create()): Writer { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey } as PublicKey; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } else { - message.secp256k1 = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts deleted file mode 100644 index fd48f83..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} -export interface DominoOp { - key: string; - input: string; - output: string; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} -export declare const Proof: { - encode(message: Proof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proof; - fromJSON(object: any): Proof; - toJSON(message: Proof): unknown; - fromPartial(object: DeepPartial): Proof; -}; -export declare const ValueOp: { - encode(message: ValueOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValueOp; - fromJSON(object: any): ValueOp; - toJSON(message: ValueOp): unknown; - fromPartial(object: DeepPartial): ValueOp; -}; -export declare const DominoOp: { - encode(message: DominoOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DominoOp; - fromJSON(object: any): DominoOp; - toJSON(message: DominoOp): unknown; - fromPartial(object: DeepPartial): DominoOp; -}; -export declare const ProofOp: { - encode(message: ProofOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOp; - fromJSON(object: any): ProofOp; - toJSON(message: ProofOp): unknown; - fromPartial(object: DeepPartial): ProofOp; -}; -export declare const ProofOps: { - encode(message: ProofOps, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOps; - fromJSON(object: any): ProofOps; - toJSON(message: ProofOps): unknown; - fromPartial(object: DeepPartial): ProofOps; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js deleted file mode 100644 index 240e074..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js +++ /dev/null @@ -1,456 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const baseProof = { total: 0, index: 0 }; -export const Proof = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof }; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64()); - break; - case 2: - message.index = longToNumber(reader.int64()); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array())); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.aunts = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } - else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; -const baseValueOp = {}; -export const ValueOp = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseDominoOp = { key: "", input: "", output: "" }; -export const DominoOp = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } - else { - message.output = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - fromPartial(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } - else { - message.output = ""; - } - return message; - }, -}; -const baseProofOp = { type: "" }; -export const ProofOp = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseProofOps = {}; -export const ProofOps = { - encode(message, writer = Writer.create()) { - for (const v of message.ops) { - ProofOp.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps }; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } - else { - obj.ops = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts deleted file mode 100644 index dae5160..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} - -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} - -export interface DominoOp { - key: string; - input: string; - output: string; -} - -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} - -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} - -const baseProof: object = { total: 0, index: 0 }; - -export const Proof = { - encode(message: Proof, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof } as Proof; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = longToNumber(reader.int64() as Long); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes( - message.leafHash !== undefined ? message.leafHash : new Uint8Array() - )); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.aunts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; - -const baseValueOp: object = {}; - -export const ValueOp = { - encode(message: ValueOp, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp } as ValueOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseDominoOp: object = { key: "", input: "", output: "" }; - -export const DominoOp = { - encode(message: DominoOp, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp } as DominoOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } else { - message.output = ""; - } - return message; - }, - - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - - fromPartial(object: DeepPartial): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } else { - message.output = ""; - } - return message; - }, -}; - -const baseProofOp: object = { type: "" }; - -export const ProofOp = { - encode(message: ProofOp, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp } as ProofOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseProofOps: object = {}; - -export const ProofOps = { - encode(message: ProofOps, writer: Writer = Writer.create()): Writer { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } else { - obj.ops = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts deleted file mode 100644 index 52af8f2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export declare const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export declare enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1 -} -export declare function blockIDFlagFromJSON(object: any): BlockIDFlag; -export declare function blockIDFlagToJSON(object: BlockIDFlag): string; -/** SignedMsgType is a type of signed message in the consensus. */ -export declare enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1 -} -export declare function signedMsgTypeFromJSON(object: any): SignedMsgType; -export declare function signedMsgTypeToJSON(object: SignedMsgType): string; -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * Txs that will be applied by state @ block.Height+1. - * NOTE: not all txs here are valid. We're just agreeing on the order first. - * This means that block.AppHash does not include these txs. - */ - txs: Uint8Array[]; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} -export declare const PartSetHeader: { - encode(message: PartSetHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PartSetHeader; - fromJSON(object: any): PartSetHeader; - toJSON(message: PartSetHeader): unknown; - fromPartial(object: DeepPartial): PartSetHeader; -}; -export declare const Part: { - encode(message: Part, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Part; - fromJSON(object: any): Part; - toJSON(message: Part): unknown; - fromPartial(object: DeepPartial): Part; -}; -export declare const BlockID: { - encode(message: BlockID, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockID; - fromJSON(object: any): BlockID; - toJSON(message: BlockID): unknown; - fromPartial(object: DeepPartial): BlockID; -}; -export declare const Header: { - encode(message: Header, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Header; - fromJSON(object: any): Header; - toJSON(message: Header): unknown; - fromPartial(object: DeepPartial
): Header; -}; -export declare const Data: { - encode(message: Data, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Data; - fromJSON(object: any): Data; - toJSON(message: Data): unknown; - fromPartial(object: DeepPartial): Data; -}; -export declare const Vote: { - encode(message: Vote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Vote; - fromJSON(object: any): Vote; - toJSON(message: Vote): unknown; - fromPartial(object: DeepPartial): Vote; -}; -export declare const Commit: { - encode(message: Commit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Commit; - fromJSON(object: any): Commit; - toJSON(message: Commit): unknown; - fromPartial(object: DeepPartial): Commit; -}; -export declare const CommitSig: { - encode(message: CommitSig, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommitSig; - fromJSON(object: any): CommitSig; - toJSON(message: CommitSig): unknown; - fromPartial(object: DeepPartial): CommitSig; -}; -export declare const Proposal: { - encode(message: Proposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proposal; - fromJSON(object: any): Proposal; - toJSON(message: Proposal): unknown; - fromPartial(object: DeepPartial): Proposal; -}; -export declare const SignedHeader: { - encode(message: SignedHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SignedHeader; - fromJSON(object: any): SignedHeader; - toJSON(message: SignedHeader): unknown; - fromPartial(object: DeepPartial): SignedHeader; -}; -export declare const LightBlock: { - encode(message: LightBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LightBlock; - fromJSON(object: any): LightBlock; - toJSON(message: LightBlock): unknown; - fromPartial(object: DeepPartial): LightBlock; -}; -export declare const BlockMeta: { - encode(message: BlockMeta, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockMeta; - fromJSON(object: any): BlockMeta; - toJSON(message: BlockMeta): unknown; - fromPartial(object: DeepPartial): BlockMeta; -}; -export declare const TxProof: { - encode(message: TxProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxProof; - fromJSON(object: any): TxProof; - toJSON(message: TxProof): unknown; - fromPartial(object: DeepPartial): TxProof; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js deleted file mode 100644 index 2eb6d87..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js +++ /dev/null @@ -1,1689 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export var BlockIDFlag; -(function (BlockIDFlag) { - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_UNKNOWN"] = 0] = "BLOCK_ID_FLAG_UNKNOWN"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_ABSENT"] = 1] = "BLOCK_ID_FLAG_ABSENT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_COMMIT"] = 2] = "BLOCK_ID_FLAG_COMMIT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_NIL"] = 3] = "BLOCK_ID_FLAG_NIL"; - BlockIDFlag[BlockIDFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(BlockIDFlag || (BlockIDFlag = {})); -export function blockIDFlagFromJSON(object) { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} -export function blockIDFlagToJSON(object) { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} -/** SignedMsgType is a type of signed message in the consensus. */ -export var SignedMsgType; -(function (SignedMsgType) { - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_UNKNOWN"] = 0] = "SIGNED_MSG_TYPE_UNKNOWN"; - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PREVOTE"] = 1] = "SIGNED_MSG_TYPE_PREVOTE"; - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PRECOMMIT"] = 2] = "SIGNED_MSG_TYPE_PRECOMMIT"; - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PROPOSAL"] = 32] = "SIGNED_MSG_TYPE_PROPOSAL"; - SignedMsgType[SignedMsgType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(SignedMsgType || (SignedMsgType = {})); -export function signedMsgTypeFromJSON(object) { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} -export function signedMsgTypeToJSON(object) { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} -const basePartSetHeader = { total: 0 }; -export const PartSetHeader = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -const basePart = { index: 0 }; -export const Part = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } - else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseBlockID = {}; -export const BlockID = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, -}; -const baseHeader = { chainId: "", height: 0 }; -export const Header = { - encode(message, writer = Writer.create()) { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes(message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array())); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes(message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array())); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array())); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes(message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array())); - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes(message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array())); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array())); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } - else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } - else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } - else { - message.validatorsHash = new Uint8Array(); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = object.nextValidatorsHash; - } - else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } - else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = object.lastResultsHash; - } - else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } - else { - message.evidenceHash = new Uint8Array(); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = object.proposerAddress; - } - else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; -const baseData = {}; -export const Data = { - encode(message, writer = Writer.create()) { - for (const v of message.txs) { - writer.uint32(10).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData }; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.txs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; -const baseVote = { type: 0, height: 0, round: 0, validatorIndex: 0 }; -export const Vote = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseCommit = { height: 0, round: 0 }; -export const Commit = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit }; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => e ? CommitSig.toJSON(e) : undefined); - } - else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommitSig = { blockIdFlag: 0 }; -export const CommitSig = { - encode(message, writer = Writer.create()) { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32(); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseProposal = { type: 0, height: 0, round: 0, polRound: 0 }; -export const Proposal = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseSignedHeader = {}; -export const SignedHeader = { - encode(message, writer = Writer.create()) { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, -}; -const baseLightBlock = {}; -export const LightBlock = { - encode(message, writer = Writer.create()) { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, -}; -const baseBlockMeta = { blockSize: 0, numTxs: 0 }; -export const BlockMeta = { - encode(message, writer = Writer.create()) { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64()); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } - else { - message.numTxs = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } - else { - message.numTxs = 0; - } - return message; - }, -}; -const baseTxProof = {}; -export const TxProof = { - encode(message, writer = Writer.create()) { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } - else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts deleted file mode 100644 index a4bef0b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts +++ /dev/null @@ -1,1912 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} - -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} - -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} - -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} - -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} - -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} - -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} - -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} - -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} - -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} - -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * Txs that will be applied by state @ block.Height+1. - * NOTE: not all txs here are valid. We're just agreeing on the order first. - * This means that block.AppHash does not include these txs. - */ - txs: Uint8Array[]; -} - -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} - -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} - -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} - -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} - -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} - -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} - -const basePartSetHeader: object = { total: 0 }; - -export const PartSetHeader = { - encode(message: PartSetHeader, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader } as PartSetHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const basePart: object = { index: 0 }; - -export const Part = { - encode(message: Part, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Part { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart } as Part; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes( - message.bytes !== undefined ? message.bytes : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseBlockID: object = {}; - -export const BlockID = { - encode(message: BlockID, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode( - message.partSetHeader, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockID { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID } as BlockID; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } else { - message.partSetHeader = undefined; - } - return message; - }, - - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } else { - message.partSetHeader = undefined; - } - return message; - }, -}; - -const baseHeader: object = { chainId: "", height: 0 }; - -export const Header = { - encode(message: Header, writer: Writer = Writer.create()): Writer { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Header { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader } as Header; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if ( - object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null - ) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if ( - object.lastResultsHash !== undefined && - object.lastResultsHash !== null - ) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if ( - object.proposerAddress !== undefined && - object.proposerAddress !== null - ) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes( - message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array() - )); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes( - message.dataHash !== undefined ? message.dataHash : new Uint8Array() - )); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes( - message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array() - )); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes( - message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array() - )); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes( - message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array() - )); - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes( - message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array() - )); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes( - message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array() - )); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes( - message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial
): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } else { - message.validatorsHash = new Uint8Array(); - } - if ( - object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null - ) { - message.nextValidatorsHash = object.nextValidatorsHash; - } else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - if ( - object.lastResultsHash !== undefined && - object.lastResultsHash !== null - ) { - message.lastResultsHash = object.lastResultsHash; - } else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } else { - message.evidenceHash = new Uint8Array(); - } - if ( - object.proposerAddress !== undefined && - object.proposerAddress !== null - ) { - message.proposerAddress = object.proposerAddress; - } else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; - -const baseData: object = {}; - -export const Data = { - encode(message: Data, writer: Writer = Writer.create()): Writer { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData } as Data; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; - -const baseVote: object = { type: 0, height: 0, round: 0, validatorIndex: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes( - message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array() - )); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseCommit: object = { height: 0, round: 0 }; - -export const Commit = { - encode(message: Commit, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit } as Commit; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? CommitSig.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommitSig: object = { blockIdFlag: 0 }; - -export const CommitSig = { - encode(message: CommitSig, writer: Writer = Writer.create()): Writer { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(26).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig } as CommitSig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32() as any; - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } else { - message.blockIdFlag = 0; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes( - message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array() - )); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } else { - message.blockIdFlag = 0; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseProposal: object = { type: 0, height: 0, round: 0, polRound: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignedHeader: object = {}; - -export const SignedHeader = { - encode(message: SignedHeader, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader } as SignedHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - return message; - }, - - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - return message; - }, -}; - -const baseLightBlock: object = {}; - -export const LightBlock = { - encode(message: LightBlock, writer: Writer = Writer.create()): Writer { - if (message.signedHeader !== undefined) { - SignedHeader.encode( - message.signedHeader, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode( - message.validatorSet, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock } as LightBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } else { - message.validatorSet = undefined; - } - return message; - }, - - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } else { - message.validatorSet = undefined; - } - return message; - }, -}; - -const baseBlockMeta: object = { blockSize: 0, numTxs: 0 }; - -export const BlockMeta = { - encode(message: BlockMeta, writer: Writer = Writer.create()): Writer { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta } as BlockMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64() as Long); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } else { - message.numTxs = 0; - } - return message; - }, - - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } else { - message.numTxs = 0; - } - return message; - }, -}; - -const baseTxProof: object = {}; - -export const TxProof = { - encode(message: TxProof, writer: Writer = Writer.create()): Writer { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof } as TxProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes( - message.rootHash !== undefined ? message.rootHash : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts deleted file mode 100644 index 0654161..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export declare const protobufPackage = "tendermint.types"; -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} -export declare const ValidatorSet: { - encode(message: ValidatorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSet; - fromJSON(object: any): ValidatorSet; - toJSON(message: ValidatorSet): unknown; - fromPartial(object: DeepPartial): ValidatorSet; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const SimpleValidator: { - encode(message: SimpleValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SimpleValidator; - fromJSON(object: any): SimpleValidator; - toJSON(message: SimpleValidator): unknown; - fromPartial(object: DeepPartial): SimpleValidator; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js deleted file mode 100644 index 1bd1e4f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js +++ /dev/null @@ -1,333 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export const protobufPackage = "tendermint.types"; -const baseValidatorSet = { totalVotingPower: 0 }; -export const ValidatorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = Number(object.totalVotingPower); - } - else { - message.totalVotingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = object.totalVotingPower; - } - else { - message.totalVotingPower = 0; - } - return message; - }, -}; -const baseValidator = { votingPower: 0, proposerPriority: 0 }; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64()); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = Number(object.proposerPriority); - } - else { - message.proposerPriority = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && - (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = object.proposerPriority; - } - else { - message.proposerPriority = 0; - } - return message; - }, -}; -const baseSimpleValidator = { votingPower: 0 }; -export const SimpleValidator = { - encode(message, writer = Writer.create()) { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts deleted file mode 100644 index c504403..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.types"; - -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} - -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} - -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} - -const baseValidatorSet: object = { totalVotingPower: 0 }; - -export const ValidatorSet = { - encode(message: ValidatorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = Number(object.totalVotingPower); - } else { - message.totalVotingPower = 0; - } - return message; - }, - - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = object.totalVotingPower; - } else { - message.totalVotingPower = 0; - } - return message; - }, -}; - -const baseValidator: object = { votingPower: 0, proposerPriority: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } else { - message.votingPower = 0; - } - if ( - object.proposerPriority !== undefined && - object.proposerPriority !== null - ) { - message.proposerPriority = Number(object.proposerPriority); - } else { - message.proposerPriority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } else { - message.votingPower = 0; - } - if ( - object.proposerPriority !== undefined && - object.proposerPriority !== null - ) { - message.proposerPriority = object.proposerPriority; - } else { - message.proposerPriority = 0; - } - return message; - }, -}; - -const baseSimpleValidator: object = { votingPower: 0 }; - -export const SimpleValidator = { - encode(message: SimpleValidator, writer: Writer = Writer.create()): Writer { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator } as SimpleValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } else { - message.votingPower = 0; - } - return message; - }, - - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - - fromPartial(object: DeepPartial): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } else { - message.votingPower = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts deleted file mode 100644 index 3158f17..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.version"; -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface Consensus { - block: number; - app: number; -} -export declare const App: { - encode(message: App, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): App; - fromJSON(object: any): App; - toJSON(message: App): unknown; - fromPartial(object: DeepPartial): App; -}; -export declare const Consensus: { - encode(message: Consensus, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Consensus; - fromJSON(object: any): Consensus; - toJSON(message: Consensus): unknown; - fromPartial(object: DeepPartial): Consensus; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js deleted file mode 100644 index 39e0693..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js +++ /dev/null @@ -1,165 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.version"; -const baseApp = { protocol: 0, software: "" }; -export const App = { - encode(message, writer = Writer.create()) { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64()); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } - else { - message.software = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - fromPartial(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } - else { - message.software = ""; - } - return message; - }, -}; -const baseConsensus = { block: 0, app: 0 }; -export const Consensus = { - encode(message, writer = Writer.create()) { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64()); - break; - case 2: - message.app = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } - else { - message.app = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } - else { - message.app = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts deleted file mode 100644 index 4bc6ad8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.version"; - -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} - -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface Consensus { - block: number; - app: number; -} - -const baseApp: object = { protocol: 0, software: "" }; - -export const App = { - encode(message: App, writer: Writer = Writer.create()): Writer { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): App { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp } as App; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64() as Long); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } else { - message.software = ""; - } - return message; - }, - - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - - fromPartial(object: DeepPartial): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } else { - message.software = ""; - } - return message; - }, -}; - -const baseConsensus: object = { block: 0, app: 0 }; - -export const Consensus = { - encode(message: Consensus, writer: Writer = Writer.create()): Writer { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Consensus { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus } as Consensus; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64() as Long); - break; - case 2: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js deleted file mode 100644 index 70ac1e1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js +++ /dev/null @@ -1,116 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { BaseVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { ContinuousVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { DelayedVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { Period } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { PeriodicVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: { - BaseVestingAccount: getStructure(BaseVestingAccount.fromPartial({})), - ContinuousVestingAccount: getStructure(ContinuousVestingAccount.fromPartial({})), - DelayedVestingAccount: getStructure(DelayedVestingAccount.fromPartial({})), - Period: getStructure(Period.fromPartial({})), - PeriodicVestingAccount: getStructure(PeriodicVestingAccount.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async sendMsgCreateVestingAccount({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateVestingAccount(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgCreateVestingAccount({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateVestingAccount(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts deleted file mode 100644 index 0dd91e7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { BaseVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { ContinuousVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { DelayedVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { Period } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { PeriodicVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - BaseVestingAccount: getStructure(BaseVestingAccount.fromPartial({})), - ContinuousVestingAccount: getStructure(ContinuousVestingAccount.fromPartial({})), - DelayedVestingAccount: getStructure(DelayedVestingAccount.fromPartial({})), - Period: getStructure(Period.fromPartial({})), - PeriodicVestingAccount: getStructure(PeriodicVestingAccount.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - - async sendMsgCreateVestingAccount({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateVestingAccount(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgCreateVestingAccount({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateVestingAccount(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts deleted file mode 100644 index bf35bfb..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgCreateVestingAccount: (data: MsgCreateVestingAccount) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js deleted file mode 100644 index 674c91f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -const types = [ - ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgCreateVestingAccount: (data) => ({ typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts deleted file mode 100644 index 3e355b6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; - - -const types = [ - ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgCreateVestingAccount: (data: MsgCreateVestingAccount): EncodeObject => ({ typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts deleted file mode 100644 index 678d5a6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** - * MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. - */ -export declare type V1Beta1MsgCreateVestingAccountResponse = object; -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/vesting/v1beta1/vesting.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js deleted file mode 100644 index fbf438f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/vesting/v1beta1/vesting.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts deleted file mode 100644 index f03aea5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts +++ /dev/null @@ -1,350 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** - * MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. - */ -export type V1Beta1MsgCreateVestingAccountResponse = object; - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/vesting/v1beta1/vesting.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts deleted file mode 100644 index 8e04916..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmos.auth.v1beta1"; -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pubKey: Any | undefined; - accountNumber: number; - sequence: number; -} -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - baseAccount: BaseAccount | undefined; - name: string; - permissions: string[]; -} -/** Params defines the parameters for the auth module. */ -export interface Params { - maxMemoCharacters: number; - txSigLimit: number; - txSizeCostPerByte: number; - sigVerifyCostEd25519: number; - sigVerifyCostSecp256k1: number; -} -export declare const BaseAccount: { - encode(message: BaseAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BaseAccount; - fromJSON(object: any): BaseAccount; - toJSON(message: BaseAccount): unknown; - fromPartial(object: DeepPartial): BaseAccount; -}; -export declare const ModuleAccount: { - encode(message: ModuleAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ModuleAccount; - fromJSON(object: any): ModuleAccount; - toJSON(message: ModuleAccount): unknown; - fromPartial(object: DeepPartial): ModuleAccount; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js deleted file mode 100644 index 415f810..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js +++ /dev/null @@ -1,379 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmos.auth.v1beta1"; -const baseBaseAccount = { address: "", accountNumber: 0, sequence: 0 }; -export const BaseAccount = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.accountNumber !== 0) { - writer.uint32(24).uint64(message.accountNumber); - } - if (message.sequence !== 0) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseAccount }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = longToNumber(reader.uint64()); - break; - case 4: - message.sequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBaseAccount }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = Any.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.accountNumber !== undefined && object.accountNumber !== null) { - message.accountNumber = Number(object.accountNumber); - } - else { - message.accountNumber = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined); - message.accountNumber !== undefined && - (obj.accountNumber = message.accountNumber); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - fromPartial(object) { - const message = { ...baseBaseAccount }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = Any.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.accountNumber !== undefined && object.accountNumber !== null) { - message.accountNumber = object.accountNumber; - } - else { - message.accountNumber = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - return message; - }, -}; -const baseModuleAccount = { name: "", permissions: "" }; -export const ModuleAccount = { - encode(message, writer = Writer.create()) { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModuleAccount }; - message.permissions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseModuleAccount }; - message.permissions = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromJSON(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseAccount !== undefined && - (obj.baseAccount = message.baseAccount - ? BaseAccount.toJSON(message.baseAccount) - : undefined); - message.name !== undefined && (obj.name = message.name); - if (message.permissions) { - obj.permissions = message.permissions.map((e) => e); - } - else { - obj.permissions = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseModuleAccount }; - message.permissions = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromPartial(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(e); - } - } - return message; - }, -}; -const baseParams = { - maxMemoCharacters: 0, - txSigLimit: 0, - txSizeCostPerByte: 0, - sigVerifyCostEd25519: 0, - sigVerifyCostSecp256k1: 0, -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.maxMemoCharacters !== 0) { - writer.uint32(8).uint64(message.maxMemoCharacters); - } - if (message.txSigLimit !== 0) { - writer.uint32(16).uint64(message.txSigLimit); - } - if (message.txSizeCostPerByte !== 0) { - writer.uint32(24).uint64(message.txSizeCostPerByte); - } - if (message.sigVerifyCostEd25519 !== 0) { - writer.uint32(32).uint64(message.sigVerifyCostEd25519); - } - if (message.sigVerifyCostSecp256k1 !== 0) { - writer.uint32(40).uint64(message.sigVerifyCostSecp256k1); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = longToNumber(reader.uint64()); - break; - case 2: - message.txSigLimit = longToNumber(reader.uint64()); - break; - case 3: - message.txSizeCostPerByte = longToNumber(reader.uint64()); - break; - case 4: - message.sigVerifyCostEd25519 = longToNumber(reader.uint64()); - break; - case 5: - message.sigVerifyCostSecp256k1 = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.maxMemoCharacters !== undefined && - object.maxMemoCharacters !== null) { - message.maxMemoCharacters = Number(object.maxMemoCharacters); - } - else { - message.maxMemoCharacters = 0; - } - if (object.txSigLimit !== undefined && object.txSigLimit !== null) { - message.txSigLimit = Number(object.txSigLimit); - } - else { - message.txSigLimit = 0; - } - if (object.txSizeCostPerByte !== undefined && - object.txSizeCostPerByte !== null) { - message.txSizeCostPerByte = Number(object.txSizeCostPerByte); - } - else { - message.txSizeCostPerByte = 0; - } - if (object.sigVerifyCostEd25519 !== undefined && - object.sigVerifyCostEd25519 !== null) { - message.sigVerifyCostEd25519 = Number(object.sigVerifyCostEd25519); - } - else { - message.sigVerifyCostEd25519 = 0; - } - if (object.sigVerifyCostSecp256k1 !== undefined && - object.sigVerifyCostSecp256k1 !== null) { - message.sigVerifyCostSecp256k1 = Number(object.sigVerifyCostSecp256k1); - } - else { - message.sigVerifyCostSecp256k1 = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxMemoCharacters !== undefined && - (obj.maxMemoCharacters = message.maxMemoCharacters); - message.txSigLimit !== undefined && (obj.txSigLimit = message.txSigLimit); - message.txSizeCostPerByte !== undefined && - (obj.txSizeCostPerByte = message.txSizeCostPerByte); - message.sigVerifyCostEd25519 !== undefined && - (obj.sigVerifyCostEd25519 = message.sigVerifyCostEd25519); - message.sigVerifyCostSecp256k1 !== undefined && - (obj.sigVerifyCostSecp256k1 = message.sigVerifyCostSecp256k1); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.maxMemoCharacters !== undefined && - object.maxMemoCharacters !== null) { - message.maxMemoCharacters = object.maxMemoCharacters; - } - else { - message.maxMemoCharacters = 0; - } - if (object.txSigLimit !== undefined && object.txSigLimit !== null) { - message.txSigLimit = object.txSigLimit; - } - else { - message.txSigLimit = 0; - } - if (object.txSizeCostPerByte !== undefined && - object.txSizeCostPerByte !== null) { - message.txSizeCostPerByte = object.txSizeCostPerByte; - } - else { - message.txSizeCostPerByte = 0; - } - if (object.sigVerifyCostEd25519 !== undefined && - object.sigVerifyCostEd25519 !== null) { - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; - } - else { - message.sigVerifyCostEd25519 = 0; - } - if (object.sigVerifyCostSecp256k1 !== undefined && - object.sigVerifyCostSecp256k1 !== null) { - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; - } - else { - message.sigVerifyCostSecp256k1 = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts deleted file mode 100644 index b09676a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts +++ /dev/null @@ -1,436 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.auth.v1beta1"; - -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pubKey: Any | undefined; - accountNumber: number; - sequence: number; -} - -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - baseAccount: BaseAccount | undefined; - name: string; - permissions: string[]; -} - -/** Params defines the parameters for the auth module. */ -export interface Params { - maxMemoCharacters: number; - txSigLimit: number; - txSizeCostPerByte: number; - sigVerifyCostEd25519: number; - sigVerifyCostSecp256k1: number; -} - -const baseBaseAccount: object = { address: "", accountNumber: 0, sequence: 0 }; - -export const BaseAccount = { - encode(message: BaseAccount, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.accountNumber !== 0) { - writer.uint32(24).uint64(message.accountNumber); - } - if (message.sequence !== 0) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BaseAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseAccount } as BaseAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = longToNumber(reader.uint64() as Long); - break; - case 4: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BaseAccount { - const message = { ...baseBaseAccount } as BaseAccount; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = Any.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.accountNumber !== undefined && object.accountNumber !== null) { - message.accountNumber = Number(object.accountNumber); - } else { - message.accountNumber = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: BaseAccount): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined); - message.accountNumber !== undefined && - (obj.accountNumber = message.accountNumber); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): BaseAccount { - const message = { ...baseBaseAccount } as BaseAccount; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = Any.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.accountNumber !== undefined && object.accountNumber !== null) { - message.accountNumber = object.accountNumber; - } else { - message.accountNumber = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseModuleAccount: object = { name: "", permissions: "" }; - -export const ModuleAccount = { - encode(message: ModuleAccount, writer: Writer = Writer.create()): Writer { - if (message.baseAccount !== undefined) { - BaseAccount.encode( - message.baseAccount, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModuleAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModuleAccount { - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromJSON(object.baseAccount); - } else { - message.baseAccount = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(String(e)); - } - } - return message; - }, - - toJSON(message: ModuleAccount): unknown { - const obj: any = {}; - message.baseAccount !== undefined && - (obj.baseAccount = message.baseAccount - ? BaseAccount.toJSON(message.baseAccount) - : undefined); - message.name !== undefined && (obj.name = message.name); - if (message.permissions) { - obj.permissions = message.permissions.map((e) => e); - } else { - obj.permissions = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ModuleAccount { - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromPartial(object.baseAccount); - } else { - message.baseAccount = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(e); - } - } - return message; - }, -}; - -const baseParams: object = { - maxMemoCharacters: 0, - txSigLimit: 0, - txSizeCostPerByte: 0, - sigVerifyCostEd25519: 0, - sigVerifyCostSecp256k1: 0, -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.maxMemoCharacters !== 0) { - writer.uint32(8).uint64(message.maxMemoCharacters); - } - if (message.txSigLimit !== 0) { - writer.uint32(16).uint64(message.txSigLimit); - } - if (message.txSizeCostPerByte !== 0) { - writer.uint32(24).uint64(message.txSizeCostPerByte); - } - if (message.sigVerifyCostEd25519 !== 0) { - writer.uint32(32).uint64(message.sigVerifyCostEd25519); - } - if (message.sigVerifyCostSecp256k1 !== 0) { - writer.uint32(40).uint64(message.sigVerifyCostSecp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = longToNumber(reader.uint64() as Long); - break; - case 2: - message.txSigLimit = longToNumber(reader.uint64() as Long); - break; - case 3: - message.txSizeCostPerByte = longToNumber(reader.uint64() as Long); - break; - case 4: - message.sigVerifyCostEd25519 = longToNumber(reader.uint64() as Long); - break; - case 5: - message.sigVerifyCostSecp256k1 = longToNumber( - reader.uint64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.maxMemoCharacters !== undefined && - object.maxMemoCharacters !== null - ) { - message.maxMemoCharacters = Number(object.maxMemoCharacters); - } else { - message.maxMemoCharacters = 0; - } - if (object.txSigLimit !== undefined && object.txSigLimit !== null) { - message.txSigLimit = Number(object.txSigLimit); - } else { - message.txSigLimit = 0; - } - if ( - object.txSizeCostPerByte !== undefined && - object.txSizeCostPerByte !== null - ) { - message.txSizeCostPerByte = Number(object.txSizeCostPerByte); - } else { - message.txSizeCostPerByte = 0; - } - if ( - object.sigVerifyCostEd25519 !== undefined && - object.sigVerifyCostEd25519 !== null - ) { - message.sigVerifyCostEd25519 = Number(object.sigVerifyCostEd25519); - } else { - message.sigVerifyCostEd25519 = 0; - } - if ( - object.sigVerifyCostSecp256k1 !== undefined && - object.sigVerifyCostSecp256k1 !== null - ) { - message.sigVerifyCostSecp256k1 = Number(object.sigVerifyCostSecp256k1); - } else { - message.sigVerifyCostSecp256k1 = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.maxMemoCharacters !== undefined && - (obj.maxMemoCharacters = message.maxMemoCharacters); - message.txSigLimit !== undefined && (obj.txSigLimit = message.txSigLimit); - message.txSizeCostPerByte !== undefined && - (obj.txSizeCostPerByte = message.txSizeCostPerByte); - message.sigVerifyCostEd25519 !== undefined && - (obj.sigVerifyCostEd25519 = message.sigVerifyCostEd25519); - message.sigVerifyCostSecp256k1 !== undefined && - (obj.sigVerifyCostSecp256k1 = message.sigVerifyCostSecp256k1); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.maxMemoCharacters !== undefined && - object.maxMemoCharacters !== null - ) { - message.maxMemoCharacters = object.maxMemoCharacters; - } else { - message.maxMemoCharacters = 0; - } - if (object.txSigLimit !== undefined && object.txSigLimit !== null) { - message.txSigLimit = object.txSigLimit; - } else { - message.txSigLimit = 0; - } - if ( - object.txSizeCostPerByte !== undefined && - object.txSizeCostPerByte !== null - ) { - message.txSizeCostPerByte = object.txSizeCostPerByte; - } else { - message.txSizeCostPerByte = 0; - } - if ( - object.sigVerifyCostEd25519 !== undefined && - object.sigVerifyCostEd25519 !== null - ) { - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; - } else { - message.sigVerifyCostEd25519 = 0; - } - if ( - object.sigVerifyCostSecp256k1 !== undefined && - object.sigVerifyCostSecp256k1 !== null - ) { - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; - } else { - message.sigVerifyCostSecp256k1 = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts deleted file mode 100644 index 1d0ddee..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.vesting.v1beta1"; -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccount { - fromAddress: string; - toAddress: string; - amount: Coin[]; - endTime: number; - delayed: boolean; -} -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponse { -} -export declare const MsgCreateVestingAccount: { - encode(message: MsgCreateVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateVestingAccount; - fromJSON(object: any): MsgCreateVestingAccount; - toJSON(message: MsgCreateVestingAccount): unknown; - fromPartial(object: DeepPartial): MsgCreateVestingAccount; -}; -export declare const MsgCreateVestingAccountResponse: { - encode(_: MsgCreateVestingAccountResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateVestingAccountResponse; - fromJSON(_: any): MsgCreateVestingAccountResponse; - toJSON(_: MsgCreateVestingAccountResponse): unknown; - fromPartial(_: DeepPartial): MsgCreateVestingAccountResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** - * CreateVestingAccount defines a method that enables creating a vesting - * account. - */ - CreateVestingAccount(request: MsgCreateVestingAccount): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - CreateVestingAccount(request: MsgCreateVestingAccount): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js deleted file mode 100644 index 1c0cafe..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.vesting.v1beta1"; -const baseMsgCreateVestingAccount = { - fromAddress: "", - toAddress: "", - endTime: 0, - delayed: false, -}; -export const MsgCreateVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.endTime !== 0) { - writer.uint32(32).int64(message.endTime); - } - if (message.delayed === true) { - writer.uint32(40).bool(message.delayed); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccount, - }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.endTime = longToNumber(reader.int64()); - break; - case 5: - message.delayed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgCreateVestingAccount, - }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = Number(object.endTime); - } - else { - message.endTime = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = Boolean(object.delayed); - } - else { - message.delayed = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.fromAddress !== undefined && - (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - message.endTime !== undefined && (obj.endTime = message.endTime); - message.delayed !== undefined && (obj.delayed = message.delayed); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgCreateVestingAccount, - }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = object.endTime; - } - else { - message.endTime = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = object.delayed; - } - else { - message.delayed = false; - } - return message; - }, -}; -const baseMsgCreateVestingAccountResponse = {}; -export const MsgCreateVestingAccountResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccountResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgCreateVestingAccountResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgCreateVestingAccountResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - CreateVestingAccount(request) { - const data = MsgCreateVestingAccount.encode(request).finish(); - const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreateVestingAccount", data); - return promise.then((data) => MsgCreateVestingAccountResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts deleted file mode 100644 index d5acd7d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.vesting.v1beta1"; - -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccount { - fromAddress: string; - toAddress: string; - amount: Coin[]; - endTime: number; - delayed: boolean; -} - -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponse {} - -const baseMsgCreateVestingAccount: object = { - fromAddress: "", - toAddress: "", - endTime: 0, - delayed: false, -}; - -export const MsgCreateVestingAccount = { - encode( - message: MsgCreateVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.endTime !== 0) { - writer.uint32(32).int64(message.endTime); - } - if (message.delayed === true) { - writer.uint32(40).bool(message.delayed); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccount, - } as MsgCreateVestingAccount; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.endTime = longToNumber(reader.int64() as Long); - break; - case 5: - message.delayed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateVestingAccount { - const message = { - ...baseMsgCreateVestingAccount, - } as MsgCreateVestingAccount; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = Number(object.endTime); - } else { - message.endTime = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = Boolean(object.delayed); - } else { - message.delayed = false; - } - return message; - }, - - toJSON(message: MsgCreateVestingAccount): unknown { - const obj: any = {}; - message.fromAddress !== undefined && - (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - message.endTime !== undefined && (obj.endTime = message.endTime); - message.delayed !== undefined && (obj.delayed = message.delayed); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgCreateVestingAccount { - const message = { - ...baseMsgCreateVestingAccount, - } as MsgCreateVestingAccount; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = object.endTime; - } else { - message.endTime = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = object.delayed; - } else { - message.delayed = false; - } - return message; - }, -}; - -const baseMsgCreateVestingAccountResponse: object = {}; - -export const MsgCreateVestingAccountResponse = { - encode( - _: MsgCreateVestingAccountResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgCreateVestingAccountResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccountResponse, - } as MsgCreateVestingAccountResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreateVestingAccountResponse { - const message = { - ...baseMsgCreateVestingAccountResponse, - } as MsgCreateVestingAccountResponse; - return message; - }, - - toJSON(_: MsgCreateVestingAccountResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCreateVestingAccountResponse { - const message = { - ...baseMsgCreateVestingAccountResponse, - } as MsgCreateVestingAccountResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** - * CreateVestingAccount defines a method that enables creating a vesting - * account. - */ - CreateVestingAccount( - request: MsgCreateVestingAccount - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateVestingAccount( - request: MsgCreateVestingAccount - ): Promise { - const data = MsgCreateVestingAccount.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.vesting.v1beta1.Msg", - "CreateVestingAccount", - data - ); - return promise.then((data) => - MsgCreateVestingAccountResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts deleted file mode 100644 index 6438ee0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { BaseAccount } from "../../../cosmos/auth/v1beta1/auth"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.vesting.v1beta1"; -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccount { - baseAccount: BaseAccount | undefined; - originalVesting: Coin[]; - delegatedFree: Coin[]; - delegatedVesting: Coin[]; - endTime: number; -} -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: number; -} -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; -} -/** Period defines a length of time and amount of coins that will vest. */ -export interface Period { - length: number; - amount: Coin[]; -} -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: number; - vestingPeriods: Period[]; -} -export declare const BaseVestingAccount: { - encode(message: BaseVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BaseVestingAccount; - fromJSON(object: any): BaseVestingAccount; - toJSON(message: BaseVestingAccount): unknown; - fromPartial(object: DeepPartial): BaseVestingAccount; -}; -export declare const ContinuousVestingAccount: { - encode(message: ContinuousVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ContinuousVestingAccount; - fromJSON(object: any): ContinuousVestingAccount; - toJSON(message: ContinuousVestingAccount): unknown; - fromPartial(object: DeepPartial): ContinuousVestingAccount; -}; -export declare const DelayedVestingAccount: { - encode(message: DelayedVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelayedVestingAccount; - fromJSON(object: any): DelayedVestingAccount; - toJSON(message: DelayedVestingAccount): unknown; - fromPartial(object: DeepPartial): DelayedVestingAccount; -}; -export declare const Period: { - encode(message: Period, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Period; - fromJSON(object: any): Period; - toJSON(message: Period): unknown; - fromPartial(object: DeepPartial): Period; -}; -export declare const PeriodicVestingAccount: { - encode(message: PeriodicVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PeriodicVestingAccount; - fromJSON(object: any): PeriodicVestingAccount; - toJSON(message: PeriodicVestingAccount): unknown; - fromPartial(object: DeepPartial): PeriodicVestingAccount; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js deleted file mode 100644 index 2aa46de..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js +++ /dev/null @@ -1,492 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { BaseAccount } from "../../../cosmos/auth/v1beta1/auth"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.vesting.v1beta1"; -const baseBaseVestingAccount = { endTime: 0 }; -export const BaseVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.originalVesting) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatedFree) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.delegatedVesting) { - Coin.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.endTime !== 0) { - writer.uint32(40).int64(message.endTime); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseVestingAccount }; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.originalVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegatedFree.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBaseVestingAccount }; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromJSON(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.originalVesting !== undefined && - object.originalVesting !== null) { - for (const e of object.originalVesting) { - message.originalVesting.push(Coin.fromJSON(e)); - } - } - if (object.delegatedFree !== undefined && object.delegatedFree !== null) { - for (const e of object.delegatedFree) { - message.delegatedFree.push(Coin.fromJSON(e)); - } - } - if (object.delegatedVesting !== undefined && - object.delegatedVesting !== null) { - for (const e of object.delegatedVesting) { - message.delegatedVesting.push(Coin.fromJSON(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = Number(object.endTime); - } - else { - message.endTime = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseAccount !== undefined && - (obj.baseAccount = message.baseAccount - ? BaseAccount.toJSON(message.baseAccount) - : undefined); - if (message.originalVesting) { - obj.originalVesting = message.originalVesting.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.originalVesting = []; - } - if (message.delegatedFree) { - obj.delegatedFree = message.delegatedFree.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.delegatedFree = []; - } - if (message.delegatedVesting) { - obj.delegatedVesting = message.delegatedVesting.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.delegatedVesting = []; - } - message.endTime !== undefined && (obj.endTime = message.endTime); - return obj; - }, - fromPartial(object) { - const message = { ...baseBaseVestingAccount }; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromPartial(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.originalVesting !== undefined && - object.originalVesting !== null) { - for (const e of object.originalVesting) { - message.originalVesting.push(Coin.fromPartial(e)); - } - } - if (object.delegatedFree !== undefined && object.delegatedFree !== null) { - for (const e of object.delegatedFree) { - message.delegatedFree.push(Coin.fromPartial(e)); - } - } - if (object.delegatedVesting !== undefined && - object.delegatedVesting !== null) { - for (const e of object.delegatedVesting) { - message.delegatedVesting.push(Coin.fromPartial(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = object.endTime; - } - else { - message.endTime = 0; - } - return message; - }, -}; -const baseContinuousVestingAccount = { startTime: 0 }; -export const ContinuousVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== 0) { - writer.uint32(16).int64(message.startTime); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseContinuousVestingAccount, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseContinuousVestingAccount, - }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Number(object.startTime); - } - else { - message.startTime = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - message.startTime !== undefined && (obj.startTime = message.startTime); - return obj; - }, - fromPartial(object) { - const message = { - ...baseContinuousVestingAccount, - }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime; - } - else { - message.startTime = 0; - } - return message; - }, -}; -const baseDelayedVestingAccount = {}; -export const DelayedVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelayedVestingAccount }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelayedVestingAccount }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelayedVestingAccount }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - return message; - }, -}; -const basePeriod = { length: 0 }; -export const Period = { - encode(message, writer = Writer.create()) { - if (message.length !== 0) { - writer.uint32(8).int64(message.length); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriod }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.length = longToNumber(reader.int64()); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePeriod }; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = Number(object.length); - } - else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.length !== undefined && (obj.length = message.length); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...basePeriod }; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } - else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const basePeriodicVestingAccount = { startTime: 0 }; -export const PeriodicVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== 0) { - writer.uint32(16).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriodicVestingAccount }; - message.vestingPeriods = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = longToNumber(reader.int64()); - break; - case 3: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePeriodicVestingAccount }; - message.vestingPeriods = []; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Number(object.startTime); - } - else { - message.startTime = 0; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - message.startTime !== undefined && (obj.startTime = message.startTime); - if (message.vestingPeriods) { - obj.vestingPeriods = message.vestingPeriods.map((e) => e ? Period.toJSON(e) : undefined); - } - else { - obj.vestingPeriods = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...basePeriodicVestingAccount }; - message.vestingPeriods = []; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime; - } - else { - message.startTime = 0; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts deleted file mode 100644 index 8181ec8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts +++ /dev/null @@ -1,642 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { BaseAccount } from "../../../cosmos/auth/v1beta1/auth"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.vesting.v1beta1"; - -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccount { - baseAccount: BaseAccount | undefined; - originalVesting: Coin[]; - delegatedFree: Coin[]; - delegatedVesting: Coin[]; - endTime: number; -} - -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: number; -} - -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; -} - -/** Period defines a length of time and amount of coins that will vest. */ -export interface Period { - length: number; - amount: Coin[]; -} - -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: number; - vestingPeriods: Period[]; -} - -const baseBaseVestingAccount: object = { endTime: 0 }; - -export const BaseVestingAccount = { - encode( - message: BaseVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.baseAccount !== undefined) { - BaseAccount.encode( - message.baseAccount, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.originalVesting) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatedFree) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.delegatedVesting) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.endTime !== 0) { - writer.uint32(40).int64(message.endTime); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BaseVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseVestingAccount } as BaseVestingAccount; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.originalVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegatedFree.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BaseVestingAccount { - const message = { ...baseBaseVestingAccount } as BaseVestingAccount; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromJSON(object.baseAccount); - } else { - message.baseAccount = undefined; - } - if ( - object.originalVesting !== undefined && - object.originalVesting !== null - ) { - for (const e of object.originalVesting) { - message.originalVesting.push(Coin.fromJSON(e)); - } - } - if (object.delegatedFree !== undefined && object.delegatedFree !== null) { - for (const e of object.delegatedFree) { - message.delegatedFree.push(Coin.fromJSON(e)); - } - } - if ( - object.delegatedVesting !== undefined && - object.delegatedVesting !== null - ) { - for (const e of object.delegatedVesting) { - message.delegatedVesting.push(Coin.fromJSON(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = Number(object.endTime); - } else { - message.endTime = 0; - } - return message; - }, - - toJSON(message: BaseVestingAccount): unknown { - const obj: any = {}; - message.baseAccount !== undefined && - (obj.baseAccount = message.baseAccount - ? BaseAccount.toJSON(message.baseAccount) - : undefined); - if (message.originalVesting) { - obj.originalVesting = message.originalVesting.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.originalVesting = []; - } - if (message.delegatedFree) { - obj.delegatedFree = message.delegatedFree.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.delegatedFree = []; - } - if (message.delegatedVesting) { - obj.delegatedVesting = message.delegatedVesting.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.delegatedVesting = []; - } - message.endTime !== undefined && (obj.endTime = message.endTime); - return obj; - }, - - fromPartial(object: DeepPartial): BaseVestingAccount { - const message = { ...baseBaseVestingAccount } as BaseVestingAccount; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromPartial(object.baseAccount); - } else { - message.baseAccount = undefined; - } - if ( - object.originalVesting !== undefined && - object.originalVesting !== null - ) { - for (const e of object.originalVesting) { - message.originalVesting.push(Coin.fromPartial(e)); - } - } - if (object.delegatedFree !== undefined && object.delegatedFree !== null) { - for (const e of object.delegatedFree) { - message.delegatedFree.push(Coin.fromPartial(e)); - } - } - if ( - object.delegatedVesting !== undefined && - object.delegatedVesting !== null - ) { - for (const e of object.delegatedVesting) { - message.delegatedVesting.push(Coin.fromPartial(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = object.endTime; - } else { - message.endTime = 0; - } - return message; - }, -}; - -const baseContinuousVestingAccount: object = { startTime: 0 }; - -export const ContinuousVestingAccount = { - encode( - message: ContinuousVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode( - message.baseVestingAccount, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.startTime !== 0) { - writer.uint32(16).int64(message.startTime); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ContinuousVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseContinuousVestingAccount, - } as ContinuousVestingAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.startTime = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ContinuousVestingAccount { - const message = { - ...baseContinuousVestingAccount, - } as ContinuousVestingAccount; - if ( - object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null - ) { - message.baseVestingAccount = BaseVestingAccount.fromJSON( - object.baseVestingAccount - ); - } else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Number(object.startTime); - } else { - message.startTime = 0; - } - return message; - }, - - toJSON(message: ContinuousVestingAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - message.startTime !== undefined && (obj.startTime = message.startTime); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ContinuousVestingAccount { - const message = { - ...baseContinuousVestingAccount, - } as ContinuousVestingAccount; - if ( - object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null - ) { - message.baseVestingAccount = BaseVestingAccount.fromPartial( - object.baseVestingAccount - ); - } else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime; - } else { - message.startTime = 0; - } - return message; - }, -}; - -const baseDelayedVestingAccount: object = {}; - -export const DelayedVestingAccount = { - encode( - message: DelayedVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode( - message.baseVestingAccount, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelayedVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelayedVestingAccount } as DelayedVestingAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelayedVestingAccount { - const message = { ...baseDelayedVestingAccount } as DelayedVestingAccount; - if ( - object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null - ) { - message.baseVestingAccount = BaseVestingAccount.fromJSON( - object.baseVestingAccount - ); - } else { - message.baseVestingAccount = undefined; - } - return message; - }, - - toJSON(message: DelayedVestingAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelayedVestingAccount { - const message = { ...baseDelayedVestingAccount } as DelayedVestingAccount; - if ( - object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null - ) { - message.baseVestingAccount = BaseVestingAccount.fromPartial( - object.baseVestingAccount - ); - } else { - message.baseVestingAccount = undefined; - } - return message; - }, -}; - -const basePeriod: object = { length: 0 }; - -export const Period = { - encode(message: Period, writer: Writer = Writer.create()): Writer { - if (message.length !== 0) { - writer.uint32(8).int64(message.length); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Period { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriod } as Period; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.length = longToNumber(reader.int64() as Long); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Period { - const message = { ...basePeriod } as Period; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = Number(object.length); - } else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Period): unknown { - const obj: any = {}; - message.length !== undefined && (obj.length = message.length); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Period { - const message = { ...basePeriod } as Period; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const basePeriodicVestingAccount: object = { startTime: 0 }; - -export const PeriodicVestingAccount = { - encode( - message: PeriodicVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode( - message.baseVestingAccount, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.startTime !== 0) { - writer.uint32(16).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PeriodicVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriodicVestingAccount } as PeriodicVestingAccount; - message.vestingPeriods = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.startTime = longToNumber(reader.int64() as Long); - break; - case 3: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PeriodicVestingAccount { - const message = { ...basePeriodicVestingAccount } as PeriodicVestingAccount; - message.vestingPeriods = []; - if ( - object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null - ) { - message.baseVestingAccount = BaseVestingAccount.fromJSON( - object.baseVestingAccount - ); - } else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Number(object.startTime); - } else { - message.startTime = 0; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: PeriodicVestingAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - message.startTime !== undefined && (obj.startTime = message.startTime); - if (message.vestingPeriods) { - obj.vestingPeriods = message.vestingPeriods.map((e) => - e ? Period.toJSON(e) : undefined - ); - } else { - obj.vestingPeriods = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): PeriodicVestingAccount { - const message = { ...basePeriodicVestingAccount } as PeriodicVestingAccount; - message.vestingPeriods = []; - if ( - object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null - ) { - message.baseVestingAccount = BaseVestingAccount.fromPartial( - object.baseVestingAccount - ); - } else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime; - } else { - message.startTime = 0; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.js deleted file mode 100644 index d1999a8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.js +++ /dev/null @@ -1,183 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { FungibleTokenPacketData } from "./module/types/ibc/applications/transfer/v1/transfer"; -import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer"; -import { Params } from "./module/types/ibc/applications/transfer/v1/transfer"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - DenomTrace: {}, - DenomTraces: {}, - Params: {}, - _Structure: { - FungibleTokenPacketData: getStructure(FungibleTokenPacketData.fromPartial({})), - DenomTrace: getStructure(DenomTrace.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getDenomTrace: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DenomTrace[JSON.stringify(params)] ?? {}; - }, - getDenomTraces: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.DenomTraces[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryDenomTrace({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDenomTrace(key.hash, query)).data : (await (await initQueryClient(rootGetters)).queryDenomTrace(key.hash)).data; - commit('QUERY', { query: 'DenomTrace', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomTrace', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomTrace']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomTrace', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryDenomTraces({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryDenomTraces(query)).data : (await (await initQueryClient(rootGetters)).queryDenomTraces()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryDenomTraces({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'DenomTraces', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomTraces', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomTraces']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomTraces', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryParams(query)).data : (await (await initQueryClient(rootGetters)).queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgTransfer({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTransfer(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTransfer:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgTransfer({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTransfer(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTransfer:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.ts deleted file mode 100644 index 366bba5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/index.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { FungibleTokenPacketData } from "./module/types/ibc/applications/transfer/v1/transfer" -import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer" -import { Params } from "./module/types/ibc/applications/transfer/v1/transfer" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - DenomTrace: {}, - DenomTraces: {}, - Params: {}, - - _Structure: { - FungibleTokenPacketData: getStructure(FungibleTokenPacketData.fromPartial({})), - DenomTrace: getStructure(DenomTrace.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getDenomTrace: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomTrace[JSON.stringify(params)] ?? {} - }, - getDenomTraces: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomTraces[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryDenomTrace({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDenomTrace( key.hash, query)).data:(await (await initQueryClient(rootGetters)).queryDenomTrace( key.hash )).data - - commit('QUERY', { query: 'DenomTrace', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomTrace', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomTrace']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomTrace', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryDenomTraces({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryDenomTraces( query)).data:(await (await initQueryClient(rootGetters)).queryDenomTraces()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryDenomTraces({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'DenomTraces', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomTraces', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomTraces']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryDenomTraces', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryParams( query)).data:(await (await initQueryClient(rootGetters)).queryParams()).data - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgTransfer({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTransfer(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTransfer:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgTransfer({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTransfer(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTransfer:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.d.ts deleted file mode 100644 index 197e1ad..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgTransfer: (data: MsgTransfer) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.js deleted file mode 100644 index 257562a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; -const types = [ - ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgTransfer: (data) => ({ typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.ts deleted file mode 100644 index ff73ae2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; - - -const types = [ - ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgTransfer: (data: MsgTransfer): EncodeObject => ({ typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.d.ts deleted file mode 100644 index 4c0524a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.d.ts +++ /dev/null @@ -1,349 +0,0 @@ -/** -* Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. -*/ -export interface Applicationstransferv1Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled?: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled?: boolean; -} -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. -*/ -export interface V1DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path?: string; - /** base denomination of the relayed fungible token. */ - baseDenom?: string; -} -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - /** @format uint64 */ - revisionHeight?: string; -} -/** - * MsgTransferResponse defines the Msg/Transfer response type. - */ -export declare type V1MsgTransferResponse = object; -/** -* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. -*/ -export interface V1QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace?: V1DenomTrace; -} -/** -* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. -*/ -export interface V1QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces?: V1DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: Applicationstransferv1Params; -} -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title ibc/applications/transfer/v1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/applications/transfer/v1beta1/denom_traces - */ - queryDenomTraces: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/applications/transfer/v1beta1/denom_traces/{hash} - */ - queryDenomTrace: (hash: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/applications/transfer/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.js deleted file mode 100644 index 505eacd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.js +++ /dev/null @@ -1,183 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title ibc/applications/transfer/v1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/applications/transfer/v1beta1/denom_traces - */ - this.queryDenomTraces = (query, params = {}) => this.request({ - path: `/ibc/applications/transfer/v1beta1/denom_traces`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/applications/transfer/v1beta1/denom_traces/{hash} - */ - this.queryDenomTrace = (hash, params = {}) => this.request({ - path: `/ibc/applications/transfer/v1beta1/denom_traces/${hash}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/applications/transfer/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/ibc/applications/transfer/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.ts deleted file mode 100644 index d69d69c..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/rest.ts +++ /dev/null @@ -1,542 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. -*/ -export interface Applicationstransferv1Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled?: boolean; - - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled?: boolean; -} - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. -*/ -export interface V1DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path?: string; - - /** base denomination of the relayed fungible token. */ - baseDenom?: string; -} - -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - - /** @format uint64 */ - revisionHeight?: string; -} - -/** - * MsgTransferResponse defines the Msg/Transfer response type. - */ -export type V1MsgTransferResponse = object; - -/** -* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. -*/ -export interface V1QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace?: V1DenomTrace; -} - -/** -* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. -*/ -export interface V1QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces?: V1DenomTrace[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: Applicationstransferv1Params; -} - -/** -* Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/applications/transfer/v1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/applications/transfer/v1beta1/denom_traces - */ - queryDenomTraces = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/applications/transfer/v1beta1/denom_traces`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/applications/transfer/v1beta1/denom_traces/{hash} - */ - queryDenomTrace = (hash: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/applications/transfer/v1beta1/denom_traces/${hash}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/applications/transfer/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/applications/transfer/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts deleted file mode 100644 index 9b40397..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { DenomTrace, Params } from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisState { - portId: string; - denomTraces: DenomTrace[]; - params: Params | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js deleted file mode 100644 index 3ca5ecc..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js +++ /dev/null @@ -1,100 +0,0 @@ -/* eslint-disable */ -import { DenomTrace, Params, } from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseGenesisState = { portId: "" }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - for (const v of message.denomTraces) { - DenomTrace.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => e ? DenomTrace.toJSON(e) : undefined); - } - else { - obj.denomTraces = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts deleted file mode 100644 index 6fdd36c..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* eslint-disable */ -import { - DenomTrace, - Params, -} from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisState { - portId: string; - denomTraces: DenomTrace[]; - params: Params | undefined; -} - -const baseGenesisState: object = { portId: "" }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - for (const v of message.denomTraces) { - DenomTrace.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => - e ? DenomTrace.toJSON(e) : undefined - ); - } else { - obj.denomTraces = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts deleted file mode 100644 index f71b784..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { DenomTrace, Params } from "../../../../ibc/applications/transfer/v1/transfer"; -import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequest { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace: DenomTrace | undefined; -} -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces: DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export declare const QueryDenomTraceRequest: { - encode(message: QueryDenomTraceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceRequest; - fromJSON(object: any): QueryDenomTraceRequest; - toJSON(message: QueryDenomTraceRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomTraceRequest; -}; -export declare const QueryDenomTraceResponse: { - encode(message: QueryDenomTraceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceResponse; - fromJSON(object: any): QueryDenomTraceResponse; - toJSON(message: QueryDenomTraceResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomTraceResponse; -}; -export declare const QueryDenomTracesRequest: { - encode(message: QueryDenomTracesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesRequest; - fromJSON(object: any): QueryDenomTracesRequest; - toJSON(message: QueryDenomTracesRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomTracesRequest; -}; -export declare const QueryDenomTracesResponse: { - encode(message: QueryDenomTracesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesResponse; - fromJSON(object: any): QueryDenomTracesResponse; - toJSON(message: QueryDenomTracesResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomTracesResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** DenomTrace queries a denomination trace information. */ - DenomTrace(request: QueryDenomTraceRequest): Promise; - /** DenomTraces queries all denomination traces. */ - DenomTraces(request: QueryDenomTracesRequest): Promise; - /** Params queries all parameters of the ibc-transfer module. */ - Params(request: QueryParamsRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - DenomTrace(request: QueryDenomTraceRequest): Promise; - DenomTraces(request: QueryDenomTracesRequest): Promise; - Params(request: QueryParamsRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js deleted file mode 100644 index f6b6a4b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js +++ /dev/null @@ -1,365 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { DenomTrace, Params, } from "../../../../ibc/applications/transfer/v1/transfer"; -import { PageRequest, PageResponse, } from "../../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseQueryDenomTraceRequest = { hash: "" }; -export const QueryDenomTraceRequest = { - encode(message, writer = Writer.create()) { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomTraceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDenomTraceRequest }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } - else { - message.hash = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDenomTraceRequest }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = ""; - } - return message; - }, -}; -const baseQueryDenomTraceResponse = {}; -export const QueryDenomTraceResponse = { - encode(message, writer = Writer.create()) { - if (message.denomTrace !== undefined) { - DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTraceResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTrace = DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomTraceResponse, - }; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromJSON(object.denomTrace); - } - else { - message.denomTrace = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denomTrace !== undefined && - (obj.denomTrace = message.denomTrace - ? DenomTrace.toJSON(message.denomTrace) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomTraceResponse, - }; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromPartial(object.denomTrace); - } - else { - message.denomTrace = undefined; - } - return message; - }, -}; -const baseQueryDenomTracesRequest = {}; -export const QueryDenomTracesRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomTracesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomTracesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDenomTracesResponse = {}; -export const QueryDenomTracesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.denomTraces) { - DenomTrace.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesResponse, - }; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomTracesResponse, - }; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => e ? DenomTrace.toJSON(e) : undefined); - } - else { - obj.denomTraces = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomTracesResponse, - }; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - DenomTrace(request) { - const data = QueryDenomTraceRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomTrace", data); - return promise.then((data) => QueryDenomTraceResponse.decode(new Reader(data))); - } - DenomTraces(request) { - const data = QueryDenomTracesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomTraces", data); - return promise.then((data) => QueryDenomTracesResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts deleted file mode 100644 index 805c5ec..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts +++ /dev/null @@ -1,530 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - DenomTrace, - Params, -} from "../../../../ibc/applications/transfer/v1/transfer"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequest { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} - -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace: DenomTrace | undefined; -} - -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces: DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -const baseQueryDenomTraceRequest: object = { hash: "" }; - -export const QueryDenomTraceRequest = { - encode( - message: QueryDenomTraceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTraceRequest { - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - return message; - }, - - toJSON(message: QueryDenomTraceRequest): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTraceRequest { - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - return message; - }, -}; - -const baseQueryDenomTraceResponse: object = {}; - -export const QueryDenomTraceResponse = { - encode( - message: QueryDenomTraceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.denomTrace !== undefined) { - DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTrace = DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTraceResponse { - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromJSON(object.denomTrace); - } else { - message.denomTrace = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTraceResponse): unknown { - const obj: any = {}; - message.denomTrace !== undefined && - (obj.denomTrace = message.denomTrace - ? DenomTrace.toJSON(message.denomTrace) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTraceResponse { - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromPartial(object.denomTrace); - } else { - message.denomTrace = undefined; - } - return message; - }, -}; - -const baseQueryDenomTracesRequest: object = {}; - -export const QueryDenomTracesRequest = { - encode( - message: QueryDenomTracesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTracesRequest { - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTracesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTracesRequest { - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomTracesResponse: object = {}; - -export const QueryDenomTracesResponse = { - encode( - message: QueryDenomTracesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.denomTraces) { - DenomTrace.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomTracesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTracesResponse { - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTracesResponse): unknown { - const obj: any = {}; - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => - e ? DenomTrace.toJSON(e) : undefined - ); - } else { - obj.denomTraces = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTracesResponse { - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** DenomTrace queries a denomination trace information. */ - DenomTrace(request: QueryDenomTraceRequest): Promise; - /** DenomTraces queries all denomination traces. */ - DenomTraces( - request: QueryDenomTracesRequest - ): Promise; - /** Params queries all parameters of the ibc-transfer module. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - DenomTrace( - request: QueryDenomTraceRequest - ): Promise { - const data = QueryDenomTraceRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomTrace", - data - ); - return promise.then((data) => - QueryDenomTraceResponse.decode(new Reader(data)) - ); - } - - DenomTraces( - request: QueryDenomTracesRequest - ): Promise { - const data = QueryDenomTracesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomTraces", - data - ); - return promise.then((data) => - QueryDenomTracesResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts deleted file mode 100644 index a892e2e..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketData { - /** the token denomination to be transferred */ - denom: string; - /** the token amount to be transferred */ - amount: number; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; -} -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - baseDenom: string; -} -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled: boolean; -} -export declare const FungibleTokenPacketData: { - encode(message: FungibleTokenPacketData, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FungibleTokenPacketData; - fromJSON(object: any): FungibleTokenPacketData; - toJSON(message: FungibleTokenPacketData): unknown; - fromPartial(object: DeepPartial): FungibleTokenPacketData; -}; -export declare const DenomTrace: { - encode(message: DenomTrace, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomTrace; - fromJSON(object: any): DenomTrace; - toJSON(message: DenomTrace): unknown; - fromPartial(object: DeepPartial): DenomTrace; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js deleted file mode 100644 index 63fa579..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js +++ /dev/null @@ -1,286 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseFungibleTokenPacketData = { - denom: "", - amount: 0, - sender: "", - receiver: "", -}; -export const FungibleTokenPacketData = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== 0) { - writer.uint32(16).uint64(message.amount); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseFungibleTokenPacketData, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = longToNumber(reader.uint64()); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseFungibleTokenPacketData, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Number(object.amount); - } - else { - message.amount = 0; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } - else { - message.receiver = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - fromPartial(object) { - const message = { - ...baseFungibleTokenPacketData, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = 0; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } - else { - message.receiver = ""; - } - return message; - }, -}; -const baseDenomTrace = { path: "", baseDenom: "" }; -export const DenomTrace = { - encode(message, writer = Writer.create()) { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.baseDenom !== "") { - writer.uint32(18).string(message.baseDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomTrace }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenomTrace }; - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = String(object.baseDenom); - } - else { - message.baseDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.path !== undefined && (obj.path = message.path); - message.baseDenom !== undefined && (obj.baseDenom = message.baseDenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseDenomTrace }; - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = object.baseDenom; - } - else { - message.baseDenom = ""; - } - return message; - }, -}; -const baseParams = { sendEnabled: false, receiveEnabled: false }; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.sendEnabled === true) { - writer.uint32(8).bool(message.sendEnabled); - } - if (message.receiveEnabled === true) { - writer.uint32(16).bool(message.receiveEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled = reader.bool(); - break; - case 2: - message.receiveEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = Boolean(object.sendEnabled); - } - else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = Boolean(object.receiveEnabled); - } - else { - message.receiveEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sendEnabled !== undefined && - (obj.sendEnabled = message.sendEnabled); - message.receiveEnabled !== undefined && - (obj.receiveEnabled = message.receiveEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = object.sendEnabled; - } - else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = object.receiveEnabled; - } - else { - message.receiveEnabled = false; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts deleted file mode 100644 index c912df2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts +++ /dev/null @@ -1,355 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketData { - /** the token denomination to be transferred */ - denom: string; - /** the token amount to be transferred */ - amount: number; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; -} - -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - baseDenom: string; -} - -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled: boolean; -} - -const baseFungibleTokenPacketData: object = { - denom: "", - amount: 0, - sender: "", - receiver: "", -}; - -export const FungibleTokenPacketData = { - encode( - message: FungibleTokenPacketData, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== 0) { - writer.uint32(16).uint64(message.amount); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FungibleTokenPacketData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseFungibleTokenPacketData, - } as FungibleTokenPacketData; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = longToNumber(reader.uint64() as Long); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FungibleTokenPacketData { - const message = { - ...baseFungibleTokenPacketData, - } as FungibleTokenPacketData; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Number(object.amount); - } else { - message.amount = 0; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } else { - message.receiver = ""; - } - return message; - }, - - toJSON(message: FungibleTokenPacketData): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - - fromPartial( - object: DeepPartial - ): FungibleTokenPacketData { - const message = { - ...baseFungibleTokenPacketData, - } as FungibleTokenPacketData; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = 0; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } else { - message.receiver = ""; - } - return message; - }, -}; - -const baseDenomTrace: object = { path: "", baseDenom: "" }; - -export const DenomTrace = { - encode(message: DenomTrace, writer: Writer = Writer.create()): Writer { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.baseDenom !== "") { - writer.uint32(18).string(message.baseDenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomTrace { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomTrace } as DenomTrace; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomTrace { - const message = { ...baseDenomTrace } as DenomTrace; - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = String(object.baseDenom); - } else { - message.baseDenom = ""; - } - return message; - }, - - toJSON(message: DenomTrace): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path); - message.baseDenom !== undefined && (obj.baseDenom = message.baseDenom); - return obj; - }, - - fromPartial(object: DeepPartial): DenomTrace { - const message = { ...baseDenomTrace } as DenomTrace; - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = object.baseDenom; - } else { - message.baseDenom = ""; - } - return message; - }, -}; - -const baseParams: object = { sendEnabled: false, receiveEnabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.sendEnabled === true) { - writer.uint32(8).bool(message.sendEnabled); - } - if (message.receiveEnabled === true) { - writer.uint32(16).bool(message.receiveEnabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled = reader.bool(); - break; - case 2: - message.receiveEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = Boolean(object.sendEnabled); - } else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = Boolean(object.receiveEnabled); - } else { - message.receiveEnabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.sendEnabled !== undefined && - (obj.sendEnabled = message.sendEnabled); - message.receiveEnabled !== undefined && - (obj.receiveEnabled = message.receiveEnabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = object.sendEnabled; - } else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = object.receiveEnabled; - } else { - message.receiveEnabled = false; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts deleted file mode 100644 index f7ffdf5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransfer { - /** the port on which the packet will be sent */ - sourcePort: string; - /** the channel by which the packet will be sent */ - sourceChannel: string; - /** the tokens to be transferred */ - token: Coin | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: Height | undefined; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: number; -} -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponse { -} -export declare const MsgTransfer: { - encode(message: MsgTransfer, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTransfer; - fromJSON(object: any): MsgTransfer; - toJSON(message: MsgTransfer): unknown; - fromPartial(object: DeepPartial): MsgTransfer; -}; -export declare const MsgTransferResponse: { - encode(_: MsgTransferResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTransferResponse; - fromJSON(_: any): MsgTransferResponse; - toJSON(_: MsgTransferResponse): unknown; - fromPartial(_: DeepPartial): MsgTransferResponse; -}; -/** Msg defines the ibc/transfer Msg service. */ -export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ - Transfer(request: MsgTransfer): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Transfer(request: MsgTransfer): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js deleted file mode 100644 index 63d0181..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js +++ /dev/null @@ -1,248 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseMsgTransfer = { - sourcePort: "", - sourceChannel: "", - sender: "", - receiver: "", - timeoutTimestamp: 0, -}; -export const MsgTransfer = { - encode(message, writer = Writer.create()) { - if (message.sourcePort !== "") { - writer.uint32(10).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(18).string(message.sourceChannel); - } - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); - } - if (message.sender !== "") { - writer.uint32(34).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(42).string(message.receiver); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(56).uint64(message.timeoutTimestamp); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransfer }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourcePort = reader.string(); - break; - case 2: - message.sourceChannel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeoutTimestamp = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgTransfer }; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = String(object.sourcePort); - } - else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } - else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromJSON(object.token); - } - else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } - else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromJSON(object.timeoutHeight); - } - else { - message.timeoutHeight = undefined; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } - else { - message.timeoutTimestamp = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.token !== undefined && - (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight - ? Height.toJSON(message.timeoutHeight) - : undefined); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgTransfer }; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = object.sourcePort; - } - else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } - else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromPartial(object.token); - } - else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } - else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromPartial(object.timeoutHeight); - } - else { - message.timeoutHeight = undefined; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = object.timeoutTimestamp; - } - else { - message.timeoutTimestamp = 0; - } - return message; - }, -}; -const baseMsgTransferResponse = {}; -export const MsgTransferResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransferResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgTransferResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgTransferResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Transfer(request) { - const data = MsgTransfer.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Msg", "Transfer", data); - return promise.then((data) => MsgTransferResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts deleted file mode 100644 index a215de2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts +++ /dev/null @@ -1,314 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransfer { - /** the port on which the packet will be sent */ - sourcePort: string; - /** the channel by which the packet will be sent */ - sourceChannel: string; - /** the tokens to be transferred */ - token: Coin | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: Height | undefined; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: number; -} - -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponse {} - -const baseMsgTransfer: object = { - sourcePort: "", - sourceChannel: "", - sender: "", - receiver: "", - timeoutTimestamp: 0, -}; - -export const MsgTransfer = { - encode(message: MsgTransfer, writer: Writer = Writer.create()): Writer { - if (message.sourcePort !== "") { - writer.uint32(10).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(18).string(message.sourceChannel); - } - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); - } - if (message.sender !== "") { - writer.uint32(34).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(42).string(message.receiver); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(56).uint64(message.timeoutTimestamp); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTransfer { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransfer } as MsgTransfer; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourcePort = reader.string(); - break; - case 2: - message.sourceChannel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeoutTimestamp = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTransfer { - const message = { ...baseMsgTransfer } as MsgTransfer; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = String(object.sourcePort); - } else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromJSON(object.token); - } else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromJSON(object.timeoutHeight); - } else { - message.timeoutHeight = undefined; - } - if ( - object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null - ) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } else { - message.timeoutTimestamp = 0; - } - return message; - }, - - toJSON(message: MsgTransfer): unknown { - const obj: any = {}; - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.token !== undefined && - (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight - ? Height.toJSON(message.timeoutHeight) - : undefined); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTransfer { - const message = { ...baseMsgTransfer } as MsgTransfer; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = object.sourcePort; - } else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromPartial(object.token); - } else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromPartial(object.timeoutHeight); - } else { - message.timeoutHeight = undefined; - } - if ( - object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null - ) { - message.timeoutTimestamp = object.timeoutTimestamp; - } else { - message.timeoutTimestamp = 0; - } - return message; - }, -}; - -const baseMsgTransferResponse: object = {}; - -export const MsgTransferResponse = { - encode(_: MsgTransferResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTransferResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgTransferResponse { - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - return message; - }, - - toJSON(_: MsgTransferResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgTransferResponse { - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - return message; - }, -}; - -/** Msg defines the ibc/transfer Msg service. */ -export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ - Transfer(request: MsgTransfer): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Transfer(request: MsgTransfer): Promise { - const data = MsgTransfer.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Msg", - "Transfer", - data - ); - return promise.then((data) => MsgTransferResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts deleted file mode 100644 index eef05fd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} -export declare const IdentifiedClientState: { - encode(message: IdentifiedClientState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState; - fromJSON(object: any): IdentifiedClientState; - toJSON(message: IdentifiedClientState): unknown; - fromPartial(object: DeepPartial): IdentifiedClientState; -}; -export declare const ConsensusStateWithHeight: { - encode(message: ConsensusStateWithHeight, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusStateWithHeight; - fromJSON(object: any): ConsensusStateWithHeight; - toJSON(message: ConsensusStateWithHeight): unknown; - fromPartial(object: DeepPartial): ConsensusStateWithHeight; -}; -export declare const ClientConsensusStates: { - encode(message: ClientConsensusStates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates; - fromJSON(object: any): ClientConsensusStates; - toJSON(message: ClientConsensusStates): unknown; - fromPartial(object: DeepPartial): ClientConsensusStates; -}; -export declare const ClientUpdateProposal: { - encode(message: ClientUpdateProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal; - fromJSON(object: any): ClientUpdateProposal; - toJSON(message: ClientUpdateProposal): unknown; - fromPartial(object: DeepPartial): ClientUpdateProposal; -}; -export declare const Height: { - encode(message: Height, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Height; - fromJSON(object: any): Height; - toJSON(message: Height): unknown; - fromPartial(object: DeepPartial): Height; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js deleted file mode 100644 index 52a38ad..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js +++ /dev/null @@ -1,500 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.client.v1"; -const baseIdentifiedClientState = { clientId: "" }; -export const IdentifiedClientState = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, -}; -const baseConsensusStateWithHeight = {}; -export const ConsensusStateWithHeight = { - encode(message, writer = Writer.create()) { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, -}; -const baseClientConsensusStates = { clientId: "" }; -export const ClientConsensusStates = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } - else { - obj.consensusStates = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; -const baseClientUpdateProposal = { - title: "", - description: "", - clientId: "", -}; -export const ClientUpdateProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } - else { - message.header = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } - else { - message.header = undefined; - } - return message; - }, -}; -const baseHeight = { revisionNumber: 0, revisionHeight: 0 }; -export const Height = { - encode(message, writer = Writer.create()) { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseParams = { allowedClients: "" }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.allowedClients) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } - else { - obj.allowedClients = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index 7ca2f60..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,624 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} - -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} - -const baseIdentifiedClientState: object = { clientId: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { clientId: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensusStates = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - clientId: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } else { - message.header = undefined; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } else { - message.header = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revisionNumber: 0, revisionHeight: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseParams: object = { allowedClients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowedClients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } else { - obj.allowedClients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.applications.transfer.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.js deleted file mode 100644 index 0d49567..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.js +++ /dev/null @@ -1,694 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { Channel } from "./module/types/ibc/core/channel/v1/channel"; -import { IdentifiedChannel } from "./module/types/ibc/core/channel/v1/channel"; -import { Counterparty } from "./module/types/ibc/core/channel/v1/channel"; -import { Packet } from "./module/types/ibc/core/channel/v1/channel"; -import { PacketState } from "./module/types/ibc/core/channel/v1/channel"; -import { Acknowledgement } from "./module/types/ibc/core/channel/v1/channel"; -import { PacketSequence } from "./module/types/ibc/core/channel/v1/genesis"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Channel: {}, - Channels: {}, - ConnectionChannels: {}, - ChannelClientState: {}, - ChannelConsensusState: {}, - PacketCommitment: {}, - PacketCommitments: {}, - PacketReceipt: {}, - PacketAcknowledgement: {}, - PacketAcknowledgements: {}, - UnreceivedPackets: {}, - UnreceivedAcks: {}, - NextSequenceReceive: {}, - _Structure: { - Channel: getStructure(Channel.fromPartial({})), - IdentifiedChannel: getStructure(IdentifiedChannel.fromPartial({})), - Counterparty: getStructure(Counterparty.fromPartial({})), - Packet: getStructure(Packet.fromPartial({})), - PacketState: getStructure(PacketState.fromPartial({})), - Acknowledgement: getStructure(Acknowledgement.fromPartial({})), - PacketSequence: getStructure(PacketSequence.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getChannel: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Channel[JSON.stringify(params)] ?? {}; - }, - getChannels: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Channels[JSON.stringify(params)] ?? {}; - }, - getConnectionChannels: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ConnectionChannels[JSON.stringify(params)] ?? {}; - }, - getChannelClientState: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ChannelClientState[JSON.stringify(params)] ?? {}; - }, - getChannelConsensusState: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ChannelConsensusState[JSON.stringify(params)] ?? {}; - }, - getPacketCommitment: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.PacketCommitment[JSON.stringify(params)] ?? {}; - }, - getPacketCommitments: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.PacketCommitments[JSON.stringify(params)] ?? {}; - }, - getPacketReceipt: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.PacketReceipt[JSON.stringify(params)] ?? {}; - }, - getPacketAcknowledgement: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.PacketAcknowledgement[JSON.stringify(params)] ?? {}; - }, - getPacketAcknowledgements: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.PacketAcknowledgements[JSON.stringify(params)] ?? {}; - }, - getUnreceivedPackets: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.UnreceivedPackets[JSON.stringify(params)] ?? {}; - }, - getUnreceivedAcks: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.UnreceivedAcks[JSON.stringify(params)] ?? {}; - }, - getNextSequenceReceive: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.NextSequenceReceive[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryChannel({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryChannel(key.channel_id, key.port_id, query)).data : (await (await initQueryClient(rootGetters)).queryChannel(key.channel_id, key.port_id)).data; - commit('QUERY', { query: 'Channel', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryChannel', payload: { options: { all }, params: { ...key }, query } }); - return getters['getChannel']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannel', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryChannels({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryChannels(query)).data : (await (await initQueryClient(rootGetters)).queryChannels()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryChannels({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Channels', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryChannels', payload: { options: { all }, params: { ...key }, query } }); - return getters['getChannels']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannels', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryConnectionChannels({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConnectionChannels(key.connection, query)).data : (await (await initQueryClient(rootGetters)).queryConnectionChannels(key.connection)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryConnectionChannels(key.connection, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ConnectionChannels', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConnectionChannels', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConnectionChannels']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnectionChannels', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryChannelClientState({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryChannelClientState(key.channel_id, key.port_id, query)).data : (await (await initQueryClient(rootGetters)).queryChannelClientState(key.channel_id, key.port_id)).data; - commit('QUERY', { query: 'ChannelClientState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryChannelClientState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getChannelClientState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannelClientState', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryChannelConsensusState({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryChannelConsensusState(key.channel_id, key.port_id, key.revision_number, key.revision_height, query)).data : (await (await initQueryClient(rootGetters)).queryChannelConsensusState(key.channel_id, key.port_id, key.revision_number, key.revision_height)).data; - commit('QUERY', { query: 'ChannelConsensusState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryChannelConsensusState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getChannelConsensusState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannelConsensusState', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryPacketCommitment({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryPacketCommitment(key.channel_id, key.port_id, key.sequence, query)).data : (await (await initQueryClient(rootGetters)).queryPacketCommitment(key.channel_id, key.port_id, key.sequence)).data; - commit('QUERY', { query: 'PacketCommitment', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPacketCommitment', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPacketCommitment']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketCommitment', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryPacketCommitments({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryPacketCommitments(key.channel_id, key.port_id, query)).data : (await (await initQueryClient(rootGetters)).queryPacketCommitments(key.channel_id, key.port_id)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryPacketCommitments(key.channel_id, key.port_id, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'PacketCommitments', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPacketCommitments', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPacketCommitments']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketCommitments', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryPacketReceipt({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryPacketReceipt(key.channel_id, key.port_id, key.sequence, query)).data : (await (await initQueryClient(rootGetters)).queryPacketReceipt(key.channel_id, key.port_id, key.sequence)).data; - commit('QUERY', { query: 'PacketReceipt', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPacketReceipt', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPacketReceipt']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketReceipt', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryPacketAcknowledgement({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryPacketAcknowledgement(key.channel_id, key.port_id, key.sequence, query)).data : (await (await initQueryClient(rootGetters)).queryPacketAcknowledgement(key.channel_id, key.port_id, key.sequence)).data; - commit('QUERY', { query: 'PacketAcknowledgement', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPacketAcknowledgement', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPacketAcknowledgement']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketAcknowledgement', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryPacketAcknowledgements({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryPacketAcknowledgements(key.channel_id, key.port_id, query)).data : (await (await initQueryClient(rootGetters)).queryPacketAcknowledgements(key.channel_id, key.port_id)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryPacketAcknowledgements(key.channel_id, key.port_id, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'PacketAcknowledgements', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPacketAcknowledgements', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPacketAcknowledgements']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketAcknowledgements', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryUnreceivedPackets({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryUnreceivedPackets(key.channel_id, key.port_id, key.packet_commitment_sequences, query)).data : (await (await initQueryClient(rootGetters)).queryUnreceivedPackets(key.channel_id, key.port_id, key.packet_commitment_sequences)).data; - commit('QUERY', { query: 'UnreceivedPackets', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryUnreceivedPackets', payload: { options: { all }, params: { ...key }, query } }); - return getters['getUnreceivedPackets']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryUnreceivedPackets', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryUnreceivedAcks({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryUnreceivedAcks(key.channel_id, key.port_id, key.packet_ack_sequences, query)).data : (await (await initQueryClient(rootGetters)).queryUnreceivedAcks(key.channel_id, key.port_id, key.packet_ack_sequences)).data; - commit('QUERY', { query: 'UnreceivedAcks', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryUnreceivedAcks', payload: { options: { all }, params: { ...key }, query } }); - return getters['getUnreceivedAcks']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryUnreceivedAcks', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryNextSequenceReceive({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryNextSequenceReceive(key.channel_id, key.port_id, query)).data : (await (await initQueryClient(rootGetters)).queryNextSequenceReceive(key.channel_id, key.port_id)).data; - commit('QUERY', { query: 'NextSequenceReceive', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryNextSequenceReceive', payload: { options: { all }, params: { ...key }, query } }); - return getters['getNextSequenceReceive']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryNextSequenceReceive', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgChannelOpenInit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenInit(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenInit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenInit:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgTimeout({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeout(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgTimeout:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTimeout:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgChannelOpenAck({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenAck(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenAck:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenAck:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgChannelCloseInit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseInit(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseInit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelCloseInit:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgChannelCloseConfirm({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseConfirm(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgChannelOpenConfirm({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenConfirm(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgChannelOpenTry({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenTry(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenTry:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenTry:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgRecvPacket({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgRecvPacket(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgRecvPacket:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRecvPacket:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgTimeoutOnClose({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeoutOnClose(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgAcknowledgement({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgAcknowledgement(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgAcknowledgement:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAcknowledgement:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgChannelOpenInit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenInit(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenInit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenInit:Create', 'Could not create message.'); - } - } - }, - async MsgTimeout({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeout(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgTimeout:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTimeout:Create', 'Could not create message.'); - } - } - }, - async MsgChannelOpenAck({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenAck(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenAck:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenAck:Create', 'Could not create message.'); - } - } - }, - async MsgChannelCloseInit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseInit(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseInit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelCloseInit:Create', 'Could not create message.'); - } - } - }, - async MsgChannelCloseConfirm({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseConfirm(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Create', 'Could not create message.'); - } - } - }, - async MsgChannelOpenConfirm({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenConfirm(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Create', 'Could not create message.'); - } - } - }, - async MsgChannelOpenTry({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenTry(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenTry:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChannelOpenTry:Create', 'Could not create message.'); - } - } - }, - async MsgRecvPacket({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgRecvPacket(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgRecvPacket:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRecvPacket:Create', 'Could not create message.'); - } - } - }, - async MsgTimeoutOnClose({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeoutOnClose(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Create', 'Could not create message.'); - } - } - }, - async MsgAcknowledgement({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgAcknowledgement(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgAcknowledgement:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAcknowledgement:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.ts deleted file mode 100644 index 5a56700..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/index.ts +++ /dev/null @@ -1,668 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { Channel } from "./module/types/ibc/core/channel/v1/channel" -import { IdentifiedChannel } from "./module/types/ibc/core/channel/v1/channel" -import { Counterparty } from "./module/types/ibc/core/channel/v1/channel" -import { Packet } from "./module/types/ibc/core/channel/v1/channel" -import { PacketState } from "./module/types/ibc/core/channel/v1/channel" -import { Acknowledgement } from "./module/types/ibc/core/channel/v1/channel" -import { PacketSequence } from "./module/types/ibc/core/channel/v1/genesis" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Channel: {}, - Channels: {}, - ConnectionChannels: {}, - ChannelClientState: {}, - ChannelConsensusState: {}, - PacketCommitment: {}, - PacketCommitments: {}, - PacketReceipt: {}, - PacketAcknowledgement: {}, - PacketAcknowledgements: {}, - UnreceivedPackets: {}, - UnreceivedAcks: {}, - NextSequenceReceive: {}, - - _Structure: { - Channel: getStructure(Channel.fromPartial({})), - IdentifiedChannel: getStructure(IdentifiedChannel.fromPartial({})), - Counterparty: getStructure(Counterparty.fromPartial({})), - Packet: getStructure(Packet.fromPartial({})), - PacketState: getStructure(PacketState.fromPartial({})), - Acknowledgement: getStructure(Acknowledgement.fromPartial({})), - PacketSequence: getStructure(PacketSequence.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getChannel: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Channel[JSON.stringify(params)] ?? {} - }, - getChannels: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Channels[JSON.stringify(params)] ?? {} - }, - getConnectionChannels: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConnectionChannels[JSON.stringify(params)] ?? {} - }, - getChannelClientState: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ChannelClientState[JSON.stringify(params)] ?? {} - }, - getChannelConsensusState: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ChannelConsensusState[JSON.stringify(params)] ?? {} - }, - getPacketCommitment: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketCommitment[JSON.stringify(params)] ?? {} - }, - getPacketCommitments: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketCommitments[JSON.stringify(params)] ?? {} - }, - getPacketReceipt: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketReceipt[JSON.stringify(params)] ?? {} - }, - getPacketAcknowledgement: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketAcknowledgement[JSON.stringify(params)] ?? {} - }, - getPacketAcknowledgements: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketAcknowledgements[JSON.stringify(params)] ?? {} - }, - getUnreceivedPackets: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.UnreceivedPackets[JSON.stringify(params)] ?? {} - }, - getUnreceivedAcks: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.UnreceivedAcks[JSON.stringify(params)] ?? {} - }, - getNextSequenceReceive: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.NextSequenceReceive[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryChannel({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryChannel( key.channel_id, key.port_id, query)).data:(await (await initQueryClient(rootGetters)).queryChannel( key.channel_id , key.port_id )).data - - commit('QUERY', { query: 'Channel', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannel', payload: { options: { all }, params: {...key},query }}) - return getters['getChannel']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannel', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryChannels({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryChannels( query)).data:(await (await initQueryClient(rootGetters)).queryChannels()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryChannels({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Channels', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannels', payload: { options: { all }, params: {...key},query }}) - return getters['getChannels']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannels', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryConnectionChannels({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConnectionChannels( key.connection, query)).data:(await (await initQueryClient(rootGetters)).queryConnectionChannels( key.connection )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryConnectionChannels( key.connection, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ConnectionChannels', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnectionChannels', payload: { options: { all }, params: {...key},query }}) - return getters['getConnectionChannels']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnectionChannels', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryChannelClientState({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryChannelClientState( key.channel_id, key.port_id, query)).data:(await (await initQueryClient(rootGetters)).queryChannelClientState( key.channel_id , key.port_id )).data - - commit('QUERY', { query: 'ChannelClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannelClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getChannelClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannelClientState', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryChannelConsensusState({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryChannelConsensusState( key.channel_id, key.port_id, key.revision_number, key.revision_height, query)).data:(await (await initQueryClient(rootGetters)).queryChannelConsensusState( key.channel_id , key.port_id , key.revision_number , key.revision_height )).data - - commit('QUERY', { query: 'ChannelConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannelConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getChannelConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryChannelConsensusState', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryPacketCommitment({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryPacketCommitment( key.channel_id, key.port_id, key.sequence, query)).data:(await (await initQueryClient(rootGetters)).queryPacketCommitment( key.channel_id , key.port_id , key.sequence )).data - - commit('QUERY', { query: 'PacketCommitment', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketCommitment', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketCommitment']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketCommitment', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryPacketCommitments({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryPacketCommitments( key.channel_id, key.port_id, query)).data:(await (await initQueryClient(rootGetters)).queryPacketCommitments( key.channel_id , key.port_id )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryPacketCommitments( key.channel_id, key.port_id, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'PacketCommitments', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketCommitments', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketCommitments']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketCommitments', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryPacketReceipt({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryPacketReceipt( key.channel_id, key.port_id, key.sequence, query)).data:(await (await initQueryClient(rootGetters)).queryPacketReceipt( key.channel_id , key.port_id , key.sequence )).data - - commit('QUERY', { query: 'PacketReceipt', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketReceipt', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketReceipt']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketReceipt', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryPacketAcknowledgement({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryPacketAcknowledgement( key.channel_id, key.port_id, key.sequence, query)).data:(await (await initQueryClient(rootGetters)).queryPacketAcknowledgement( key.channel_id , key.port_id , key.sequence )).data - - commit('QUERY', { query: 'PacketAcknowledgement', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketAcknowledgement', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketAcknowledgement']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketAcknowledgement', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryPacketAcknowledgements({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryPacketAcknowledgements( key.channel_id, key.port_id, query)).data:(await (await initQueryClient(rootGetters)).queryPacketAcknowledgements( key.channel_id , key.port_id )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryPacketAcknowledgements( key.channel_id, key.port_id, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'PacketAcknowledgements', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketAcknowledgements', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketAcknowledgements']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryPacketAcknowledgements', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryUnreceivedPackets({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryUnreceivedPackets( key.channel_id, key.port_id, key.packet_commitment_sequences, query)).data:(await (await initQueryClient(rootGetters)).queryUnreceivedPackets( key.channel_id , key.port_id , key.packet_commitment_sequences )).data - - commit('QUERY', { query: 'UnreceivedPackets', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUnreceivedPackets', payload: { options: { all }, params: {...key},query }}) - return getters['getUnreceivedPackets']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryUnreceivedPackets', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryUnreceivedAcks({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryUnreceivedAcks( key.channel_id, key.port_id, key.packet_ack_sequences, query)).data:(await (await initQueryClient(rootGetters)).queryUnreceivedAcks( key.channel_id , key.port_id , key.packet_ack_sequences )).data - - commit('QUERY', { query: 'UnreceivedAcks', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUnreceivedAcks', payload: { options: { all }, params: {...key},query }}) - return getters['getUnreceivedAcks']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryUnreceivedAcks', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryNextSequenceReceive({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryNextSequenceReceive( key.channel_id, key.port_id, query)).data:(await (await initQueryClient(rootGetters)).queryNextSequenceReceive( key.channel_id , key.port_id )).data - - commit('QUERY', { query: 'NextSequenceReceive', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryNextSequenceReceive', payload: { options: { all }, params: {...key},query }}) - return getters['getNextSequenceReceive']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryNextSequenceReceive', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgChannelOpenInit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenInit(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenInit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenInit:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgTimeout({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeout(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgTimeout:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTimeout:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgChannelOpenAck({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenAck(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenAck:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenAck:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgChannelCloseInit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseInit(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseInit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelCloseInit:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgChannelCloseConfirm({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseConfirm(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgChannelOpenConfirm({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenConfirm(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgChannelOpenTry({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenTry(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenTry:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenTry:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgRecvPacket({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgRecvPacket(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgRecvPacket:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgRecvPacket:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgTimeoutOnClose({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeoutOnClose(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgAcknowledgement({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgAcknowledgement(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgAcknowledgement:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgAcknowledgement:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgChannelOpenInit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenInit(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenInit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenInit:Create', 'Could not create message.') - } - } - }, - async MsgTimeout({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeout(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgTimeout:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTimeout:Create', 'Could not create message.') - } - } - }, - async MsgChannelOpenAck({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenAck(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenAck:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenAck:Create', 'Could not create message.') - } - } - }, - async MsgChannelCloseInit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseInit(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseInit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelCloseInit:Create', 'Could not create message.') - } - } - }, - async MsgChannelCloseConfirm({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelCloseConfirm(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelCloseConfirm:Create', 'Could not create message.') - } - } - }, - async MsgChannelOpenConfirm({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenConfirm(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenConfirm:Create', 'Could not create message.') - } - } - }, - async MsgChannelOpenTry({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgChannelOpenTry(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgChannelOpenTry:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgChannelOpenTry:Create', 'Could not create message.') - } - } - }, - async MsgRecvPacket({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgRecvPacket(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgRecvPacket:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgRecvPacket:Create', 'Could not create message.') - } - } - }, - async MsgTimeoutOnClose({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgTimeoutOnClose(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTimeoutOnClose:Create', 'Could not create message.') - } - } - }, - async MsgAcknowledgement({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgAcknowledgement(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgAcknowledgement:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgAcknowledgement:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.d.ts deleted file mode 100644 index 146340c..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgChannelOpenInit } from "./types/ibc/core/channel/v1/tx"; -import { MsgTimeout } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenAck } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelCloseInit } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelCloseConfirm } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenConfirm } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenTry } from "./types/ibc/core/channel/v1/tx"; -import { MsgRecvPacket } from "./types/ibc/core/channel/v1/tx"; -import { MsgTimeoutOnClose } from "./types/ibc/core/channel/v1/tx"; -import { MsgAcknowledgement } from "./types/ibc/core/channel/v1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgChannelOpenInit: (data: MsgChannelOpenInit) => EncodeObject; - msgTimeout: (data: MsgTimeout) => EncodeObject; - msgChannelOpenAck: (data: MsgChannelOpenAck) => EncodeObject; - msgChannelCloseInit: (data: MsgChannelCloseInit) => EncodeObject; - msgChannelCloseConfirm: (data: MsgChannelCloseConfirm) => EncodeObject; - msgChannelOpenConfirm: (data: MsgChannelOpenConfirm) => EncodeObject; - msgChannelOpenTry: (data: MsgChannelOpenTry) => EncodeObject; - msgRecvPacket: (data: MsgRecvPacket) => EncodeObject; - msgTimeoutOnClose: (data: MsgTimeoutOnClose) => EncodeObject; - msgAcknowledgement: (data: MsgAcknowledgement) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.js deleted file mode 100644 index c94ce11..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.js +++ /dev/null @@ -1,54 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgChannelOpenInit } from "./types/ibc/core/channel/v1/tx"; -import { MsgTimeout } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenAck } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelCloseInit } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelCloseConfirm } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenConfirm } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenTry } from "./types/ibc/core/channel/v1/tx"; -import { MsgRecvPacket } from "./types/ibc/core/channel/v1/tx"; -import { MsgTimeoutOnClose } from "./types/ibc/core/channel/v1/tx"; -import { MsgAcknowledgement } from "./types/ibc/core/channel/v1/tx"; -const types = [ - ["/ibc.core.channel.v1.MsgChannelOpenInit", MsgChannelOpenInit], - ["/ibc.core.channel.v1.MsgTimeout", MsgTimeout], - ["/ibc.core.channel.v1.MsgChannelOpenAck", MsgChannelOpenAck], - ["/ibc.core.channel.v1.MsgChannelCloseInit", MsgChannelCloseInit], - ["/ibc.core.channel.v1.MsgChannelCloseConfirm", MsgChannelCloseConfirm], - ["/ibc.core.channel.v1.MsgChannelOpenConfirm", MsgChannelOpenConfirm], - ["/ibc.core.channel.v1.MsgChannelOpenTry", MsgChannelOpenTry], - ["/ibc.core.channel.v1.MsgRecvPacket", MsgRecvPacket], - ["/ibc.core.channel.v1.MsgTimeoutOnClose", MsgTimeoutOnClose], - ["/ibc.core.channel.v1.MsgAcknowledgement", MsgAcknowledgement], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgChannelOpenInit: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: data }), - msgTimeout: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: data }), - msgChannelOpenAck: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: data }), - msgChannelCloseInit: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: data }), - msgChannelCloseConfirm: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: data }), - msgChannelOpenConfirm: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: data }), - msgChannelOpenTry: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: data }), - msgRecvPacket: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: data }), - msgTimeoutOnClose: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: data }), - msgAcknowledgement: (data) => ({ typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.ts deleted file mode 100644 index e0f43f7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/index.ts +++ /dev/null @@ -1,82 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgChannelOpenInit } from "./types/ibc/core/channel/v1/tx"; -import { MsgTimeout } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenAck } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelCloseInit } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelCloseConfirm } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenConfirm } from "./types/ibc/core/channel/v1/tx"; -import { MsgChannelOpenTry } from "./types/ibc/core/channel/v1/tx"; -import { MsgRecvPacket } from "./types/ibc/core/channel/v1/tx"; -import { MsgTimeoutOnClose } from "./types/ibc/core/channel/v1/tx"; -import { MsgAcknowledgement } from "./types/ibc/core/channel/v1/tx"; - - -const types = [ - ["/ibc.core.channel.v1.MsgChannelOpenInit", MsgChannelOpenInit], - ["/ibc.core.channel.v1.MsgTimeout", MsgTimeout], - ["/ibc.core.channel.v1.MsgChannelOpenAck", MsgChannelOpenAck], - ["/ibc.core.channel.v1.MsgChannelCloseInit", MsgChannelCloseInit], - ["/ibc.core.channel.v1.MsgChannelCloseConfirm", MsgChannelCloseConfirm], - ["/ibc.core.channel.v1.MsgChannelOpenConfirm", MsgChannelOpenConfirm], - ["/ibc.core.channel.v1.MsgChannelOpenTry", MsgChannelOpenTry], - ["/ibc.core.channel.v1.MsgRecvPacket", MsgRecvPacket], - ["/ibc.core.channel.v1.MsgTimeoutOnClose", MsgTimeoutOnClose], - ["/ibc.core.channel.v1.MsgAcknowledgement", MsgAcknowledgement], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgChannelOpenInit: (data: MsgChannelOpenInit): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: data }), - msgTimeout: (data: MsgTimeout): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: data }), - msgChannelOpenAck: (data: MsgChannelOpenAck): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: data }), - msgChannelCloseInit: (data: MsgChannelCloseInit): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: data }), - msgChannelCloseConfirm: (data: MsgChannelCloseConfirm): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: data }), - msgChannelOpenConfirm: (data: MsgChannelOpenConfirm): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: data }), - msgChannelOpenTry: (data: MsgChannelOpenTry): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: data }), - msgRecvPacket: (data: MsgRecvPacket): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: data }), - msgTimeoutOnClose: (data: MsgTimeoutOnClose): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: data }), - msgAcknowledgement: (data: MsgAcknowledgement): EncodeObject => ({ typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.d.ts deleted file mode 100644 index c934f0b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.d.ts +++ /dev/null @@ -1,968 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Channel defines pipeline for exactly-once packet delivery between specific -modules on separate blockchains, which has at least one end capable of -sending packets and one end capable of receiving packets. -*/ -export interface V1Channel { - /** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - * - * - STATE_UNINITIALIZED_UNSPECIFIED: Default State - * - STATE_INIT: A channel has just started the opening handshake. - * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - * - STATE_OPEN: A channel has completed the handshake. Open channels are - * ready to send and receive packets. - * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - * packets. - */ - state?: V1State; - /** - * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - * which they were sent. - * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - */ - ordering?: V1Order; - counterparty?: V1Counterparty; - connectionHops?: string[]; - version?: string; -} -export interface V1Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - portId?: string; - channelId?: string; -} -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - /** @format uint64 */ - revisionHeight?: string; -} -/** -* IdentifiedChannel defines a channel with additional port and channel -identifier fields. -*/ -export interface V1IdentifiedChannel { - /** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - * - * - STATE_UNINITIALIZED_UNSPECIFIED: Default State - * - STATE_INIT: A channel has just started the opening handshake. - * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - * - STATE_OPEN: A channel has completed the handshake. Open channels are - * ready to send and receive packets. - * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - * packets. - */ - state?: V1State; - /** - * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - * which they were sent. - * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - */ - ordering?: V1Order; - counterparty?: V1Counterparty; - connectionHops?: string[]; - version?: string; - portId?: string; - channelId?: string; -} -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - clientId?: string; - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; -} -/** - * MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. - */ -export declare type V1MsgAcknowledgementResponse = object; -/** - * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. - */ -export declare type V1MsgChannelCloseConfirmResponse = object; -/** - * MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. - */ -export declare type V1MsgChannelCloseInitResponse = object; -/** - * MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. - */ -export declare type V1MsgChannelOpenAckResponse = object; -/** - * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. - */ -export declare type V1MsgChannelOpenConfirmResponse = object; -/** - * MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. - */ -export declare type V1MsgChannelOpenInitResponse = object; -/** - * MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. - */ -export declare type V1MsgChannelOpenTryResponse = object; -/** - * MsgRecvPacketResponse defines the Msg/RecvPacket response type. - */ -export declare type V1MsgRecvPacketResponse = object; -/** - * MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. - */ -export declare type V1MsgTimeoutOnCloseResponse = object; -/** - * MsgTimeoutResponse defines the Msg/Timeout response type. - */ -export declare type V1MsgTimeoutResponse = object; -/** -* - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in -which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent -*/ -export declare enum V1Order { - ORDER_NONE_UNSPECIFIED = "ORDER_NONE_UNSPECIFIED", - ORDER_UNORDERED = "ORDER_UNORDERED", - ORDER_ORDERED = "ORDER_ORDERED" -} -export interface V1Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - * @format uint64 - */ - sequence?: string; - /** identifies the port on the sending chain. */ - sourcePort?: string; - /** identifies the channel end on the sending chain. */ - sourceChannel?: string; - /** identifies the port on the receiving chain. */ - destinationPort?: string; - /** identifies the channel end on the receiving chain. */ - destinationChannel?: string; - /** @format byte */ - data?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - timeoutHeight?: V1Height; - /** @format uint64 */ - timeoutTimestamp?: string; -} -/** -* PacketState defines the generic type necessary to retrieve and store -packet commitments, acknowledgements, and receipts. -Caller is responsible for knowing the context necessary to interpret this -state as a commitment, acknowledgement, or a receipt. -*/ -export interface V1PacketState { - /** channel port identifier. */ - portId?: string; - /** channel unique identifier. */ - channelId?: string; - /** - * packet sequence. - * @format uint64 - */ - sequence?: string; - /** - * embedded data that represents packet state. - * @format byte - */ - data?: string; -} -export interface V1QueryChannelClientStateResponse { - /** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ - identifiedClientState?: V1IdentifiedClientState; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryChannelConsensusStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; - clientId?: string; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -/** -* QueryChannelResponse is the response type for the Query/Channel RPC method. -Besides the Channel end, it includes a proof and the height from which the -proof was retrieved. -*/ -export interface V1QueryChannelResponse { - /** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ - channel?: V1Channel; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -/** - * QueryChannelsResponse is the response type for the Query/Channels RPC method. - */ -export interface V1QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels?: V1IdentifiedChannel[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -export interface V1QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels?: V1IdentifiedChannel[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -export interface V1QueryNextSequenceReceiveResponse { - /** @format uint64 */ - nextSequenceReceive?: string; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryPacketAcknowledgementResponse { - /** @format byte */ - acknowledgement?: string; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryPacketAcknowledgementsResponse { - acknowledgements?: V1PacketState[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -export interface V1QueryPacketCommitmentResponse { - /** @format byte */ - commitment?: string; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryPacketCommitmentsResponse { - commitments?: V1PacketState[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -export interface V1QueryPacketReceiptResponse { - received?: boolean; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryUnreceivedAcksResponse { - sequences?: string[]; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -export interface V1QueryUnreceivedPacketsResponse { - sequences?: string[]; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -/** -* State defines if a channel is in one of the following states: -CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are -ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive -packets. -*/ -export declare enum V1State { - STATE_UNINITIALIZED_UNSPECIFIED = "STATE_UNINITIALIZED_UNSPECIFIED", - STATE_INIT = "STATE_INIT", - STATE_TRYOPEN = "STATE_TRYOPEN", - STATE_OPEN = "STATE_OPEN", - STATE_CLOSED = "STATE_CLOSED" -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title ibc/core/channel/v1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryChannels - * @summary Channels queries all the IBC channels of a chain. - * @request GET:/ibc/core/channel/v1beta1/channels - */ - queryChannels: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryChannel - * @summary Channel queries an IBC Channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId} - */ - queryChannel: (channelId: string, portId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryChannelClientState - * @summary ChannelClientState queries for the client state for the channel associated - with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/client_state - */ - queryChannelClientState: (channelId: string, portId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryChannelConsensusState - * @summary ChannelConsensusState queries for the consensus state for the channel - associated with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/consensus_state/revision/{revisionNumber}/height/{revisionHeight} - */ - queryChannelConsensusState: (channelId: string, portId: string, revisionNumber: string, revisionHeight: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryNextSequenceReceive - * @summary NextSequenceReceive returns the next receive sequence for a given channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/next_sequence - */ - queryNextSequenceReceive: (channelId: string, portId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgements - * @summary PacketAcknowledgements returns all the packet acknowledgements associated - with a channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_acknowledgements - */ - queryPacketAcknowledgements: (channelId: string, portId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgement - * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_acks/{sequence} - */ - queryPacketAcknowledgement: (channelId: string, portId: string, sequence: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPacketCommitments - * @summary PacketCommitments returns all the packet commitments hashes associated - with a channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments - */ - queryPacketCommitments: (channelId: string, portId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryUnreceivedAcks - * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a - channel and sequences. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{packetAckSequences}/unreceived_acks - */ - queryUnreceivedAcks: (channelId: string, portId: string, packetAckSequences: string[], params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryUnreceivedPackets - * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a - channel and sequences. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{packetCommitmentSequences}/unreceived_packets - */ - queryUnreceivedPackets: (channelId: string, portId: string, packetCommitmentSequences: string[], params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPacketCommitment - * @summary PacketCommitment queries a stored packet commitment hash. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{sequence} - */ - queryPacketCommitment: (channelId: string, portId: string, sequence: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPacketReceipt - * @summary PacketReceipt queries if a given packet sequence has been received on the queried chain - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_receipts/{sequence} - */ - queryPacketReceipt: (channelId: string, portId: string, sequence: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConnectionChannels - * @summary ConnectionChannels queries all the channels associated with a connection - end. - * @request GET:/ibc/core/channel/v1beta1/connections/{connection}/channels - */ - queryConnectionChannels: (connection: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.js deleted file mode 100644 index 3e37973..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.js +++ /dev/null @@ -1,365 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in -which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent -*/ -export var V1Order; -(function (V1Order) { - V1Order["ORDER_NONE_UNSPECIFIED"] = "ORDER_NONE_UNSPECIFIED"; - V1Order["ORDER_UNORDERED"] = "ORDER_UNORDERED"; - V1Order["ORDER_ORDERED"] = "ORDER_ORDERED"; -})(V1Order || (V1Order = {})); -/** -* State defines if a channel is in one of the following states: -CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are -ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive -packets. -*/ -export var V1State; -(function (V1State) { - V1State["STATE_UNINITIALIZED_UNSPECIFIED"] = "STATE_UNINITIALIZED_UNSPECIFIED"; - V1State["STATE_INIT"] = "STATE_INIT"; - V1State["STATE_TRYOPEN"] = "STATE_TRYOPEN"; - V1State["STATE_OPEN"] = "STATE_OPEN"; - V1State["STATE_CLOSED"] = "STATE_CLOSED"; -})(V1State || (V1State = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title ibc/core/channel/v1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryChannels - * @summary Channels queries all the IBC channels of a chain. - * @request GET:/ibc/core/channel/v1beta1/channels - */ - this.queryChannels = (query, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryChannel - * @summary Channel queries an IBC Channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId} - */ - this.queryChannel = (channelId, portId, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryChannelClientState - * @summary ChannelClientState queries for the client state for the channel associated - with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/client_state - */ - this.queryChannelClientState = (channelId, portId, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/client_state`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryChannelConsensusState - * @summary ChannelConsensusState queries for the consensus state for the channel - associated with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/consensus_state/revision/{revisionNumber}/height/{revisionHeight} - */ - this.queryChannelConsensusState = (channelId, portId, revisionNumber, revisionHeight, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryNextSequenceReceive - * @summary NextSequenceReceive returns the next receive sequence for a given channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/next_sequence - */ - this.queryNextSequenceReceive = (channelId, portId, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/next_sequence`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgements - * @summary PacketAcknowledgements returns all the packet acknowledgements associated - with a channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_acknowledgements - */ - this.queryPacketAcknowledgements = (channelId, portId, query, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_acknowledgements`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgement - * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_acks/{sequence} - */ - this.queryPacketAcknowledgement = (channelId, portId, sequence, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_acks/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPacketCommitments - * @summary PacketCommitments returns all the packet commitments hashes associated - with a channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments - */ - this.queryPacketCommitments = (channelId, portId, query, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryUnreceivedAcks - * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a - channel and sequences. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{packetAckSequences}/unreceived_acks - */ - this.queryUnreceivedAcks = (channelId, portId, packetAckSequences, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments/${packetAckSequences}/unreceived_acks`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryUnreceivedPackets - * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a - channel and sequences. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{packetCommitmentSequences}/unreceived_packets - */ - this.queryUnreceivedPackets = (channelId, portId, packetCommitmentSequences, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments/${packetCommitmentSequences}/unreceived_packets`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPacketCommitment - * @summary PacketCommitment queries a stored packet commitment hash. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{sequence} - */ - this.queryPacketCommitment = (channelId, portId, sequence, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPacketReceipt - * @summary PacketReceipt queries if a given packet sequence has been received on the queried chain - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_receipts/{sequence} - */ - this.queryPacketReceipt = (channelId, portId, sequence, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_receipts/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConnectionChannels - * @summary ConnectionChannels queries all the channels associated with a connection - end. - * @request GET:/ibc/core/channel/v1beta1/connections/{connection}/channels - */ - this.queryConnectionChannels = (connection, query, params = {}) => this.request({ - path: `/ibc/core/channel/v1beta1/connections/${connection}/channels`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.ts deleted file mode 100644 index e5f2fa4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/rest.ts +++ /dev/null @@ -1,1317 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Channel defines pipeline for exactly-once packet delivery between specific -modules on separate blockchains, which has at least one end capable of -sending packets and one end capable of receiving packets. -*/ -export interface V1Channel { - /** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - * - * - STATE_UNINITIALIZED_UNSPECIFIED: Default State - * - STATE_INIT: A channel has just started the opening handshake. - * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - * - STATE_OPEN: A channel has completed the handshake. Open channels are - * ready to send and receive packets. - * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - * packets. - */ - state?: V1State; - - /** - * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - * which they were sent. - * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - */ - ordering?: V1Order; - counterparty?: V1Counterparty; - connectionHops?: string[]; - version?: string; -} - -export interface V1Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - portId?: string; - channelId?: string; -} - -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - - /** @format uint64 */ - revisionHeight?: string; -} - -/** -* IdentifiedChannel defines a channel with additional port and channel -identifier fields. -*/ -export interface V1IdentifiedChannel { - /** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - * - * - STATE_UNINITIALIZED_UNSPECIFIED: Default State - * - STATE_INIT: A channel has just started the opening handshake. - * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - * - STATE_OPEN: A channel has completed the handshake. Open channels are - * ready to send and receive packets. - * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - * packets. - */ - state?: V1State; - - /** - * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - * which they were sent. - * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - */ - ordering?: V1Order; - counterparty?: V1Counterparty; - connectionHops?: string[]; - version?: string; - portId?: string; - channelId?: string; -} - -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - clientId?: string; - - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; -} - -/** - * MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. - */ -export type V1MsgAcknowledgementResponse = object; - -/** - * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. - */ -export type V1MsgChannelCloseConfirmResponse = object; - -/** - * MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. - */ -export type V1MsgChannelCloseInitResponse = object; - -/** - * MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. - */ -export type V1MsgChannelOpenAckResponse = object; - -/** - * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. - */ -export type V1MsgChannelOpenConfirmResponse = object; - -/** - * MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. - */ -export type V1MsgChannelOpenInitResponse = object; - -/** - * MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. - */ -export type V1MsgChannelOpenTryResponse = object; - -/** - * MsgRecvPacketResponse defines the Msg/RecvPacket response type. - */ -export type V1MsgRecvPacketResponse = object; - -/** - * MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. - */ -export type V1MsgTimeoutOnCloseResponse = object; - -/** - * MsgTimeoutResponse defines the Msg/Timeout response type. - */ -export type V1MsgTimeoutResponse = object; - -/** -* - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in -which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent -*/ -export enum V1Order { - ORDER_NONE_UNSPECIFIED = "ORDER_NONE_UNSPECIFIED", - ORDER_UNORDERED = "ORDER_UNORDERED", - ORDER_ORDERED = "ORDER_ORDERED", -} - -export interface V1Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - * @format uint64 - */ - sequence?: string; - - /** identifies the port on the sending chain. */ - sourcePort?: string; - - /** identifies the channel end on the sending chain. */ - sourceChannel?: string; - - /** identifies the port on the receiving chain. */ - destinationPort?: string; - - /** identifies the channel end on the receiving chain. */ - destinationChannel?: string; - - /** @format byte */ - data?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - timeoutHeight?: V1Height; - - /** @format uint64 */ - timeoutTimestamp?: string; -} - -/** -* PacketState defines the generic type necessary to retrieve and store -packet commitments, acknowledgements, and receipts. -Caller is responsible for knowing the context necessary to interpret this -state as a commitment, acknowledgement, or a receipt. -*/ -export interface V1PacketState { - /** channel port identifier. */ - portId?: string; - - /** channel unique identifier. */ - channelId?: string; - - /** - * packet sequence. - * @format uint64 - */ - sequence?: string; - - /** - * embedded data that represents packet state. - * @format byte - */ - data?: string; -} - -export interface V1QueryChannelClientStateResponse { - /** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ - identifiedClientState?: V1IdentifiedClientState; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryChannelConsensusStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; - clientId?: string; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -/** -* QueryChannelResponse is the response type for the Query/Channel RPC method. -Besides the Channel end, it includes a proof and the height from which the -proof was retrieved. -*/ -export interface V1QueryChannelResponse { - /** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ - channel?: V1Channel; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -/** - * QueryChannelsResponse is the response type for the Query/Channels RPC method. - */ -export interface V1QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels?: V1IdentifiedChannel[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -export interface V1QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels?: V1IdentifiedChannel[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -export interface V1QueryNextSequenceReceiveResponse { - /** @format uint64 */ - nextSequenceReceive?: string; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryPacketAcknowledgementResponse { - /** @format byte */ - acknowledgement?: string; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryPacketAcknowledgementsResponse { - acknowledgements?: V1PacketState[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -export interface V1QueryPacketCommitmentResponse { - /** @format byte */ - commitment?: string; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryPacketCommitmentsResponse { - commitments?: V1PacketState[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -export interface V1QueryPacketReceiptResponse { - received?: boolean; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryUnreceivedAcksResponse { - sequences?: string[]; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -export interface V1QueryUnreceivedPacketsResponse { - sequences?: string[]; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -/** -* State defines if a channel is in one of the following states: -CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are -ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive -packets. -*/ -export enum V1State { - STATE_UNINITIALIZED_UNSPECIFIED = "STATE_UNINITIALIZED_UNSPECIFIED", - STATE_INIT = "STATE_INIT", - STATE_TRYOPEN = "STATE_TRYOPEN", - STATE_OPEN = "STATE_OPEN", - STATE_CLOSED = "STATE_CLOSED", -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/core/channel/v1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryChannels - * @summary Channels queries all the IBC channels of a chain. - * @request GET:/ibc/core/channel/v1beta1/channels - */ - queryChannels = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryChannel - * @summary Channel queries an IBC Channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId} - */ - queryChannel = (channelId: string, portId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryChannelClientState - * @summary ChannelClientState queries for the client state for the channel associated -with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/client_state - */ - queryChannelClientState = (channelId: string, portId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/client_state`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryChannelConsensusState - * @summary ChannelConsensusState queries for the consensus state for the channel -associated with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/consensus_state/revision/{revisionNumber}/height/{revisionHeight} - */ - queryChannelConsensusState = ( - channelId: string, - portId: string, - revisionNumber: string, - revisionHeight: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryNextSequenceReceive - * @summary NextSequenceReceive returns the next receive sequence for a given channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/next_sequence - */ - queryNextSequenceReceive = (channelId: string, portId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/next_sequence`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgements - * @summary PacketAcknowledgements returns all the packet acknowledgements associated -with a channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_acknowledgements - */ - queryPacketAcknowledgements = ( - channelId: string, - portId: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_acknowledgements`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgement - * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_acks/{sequence} - */ - queryPacketAcknowledgement = (channelId: string, portId: string, sequence: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_acks/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketCommitments - * @summary PacketCommitments returns all the packet commitments hashes associated -with a channel. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments - */ - queryPacketCommitments = ( - channelId: string, - portId: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUnreceivedAcks - * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a -channel and sequences. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{packetAckSequences}/unreceived_acks - */ - queryUnreceivedAcks = (channelId: string, portId: string, packetAckSequences: string[], params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments/${packetAckSequences}/unreceived_acks`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUnreceivedPackets - * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a -channel and sequences. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{packetCommitmentSequences}/unreceived_packets - */ - queryUnreceivedPackets = ( - channelId: string, - portId: string, - packetCommitmentSequences: string[], - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments/${packetCommitmentSequences}/unreceived_packets`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketCommitment - * @summary PacketCommitment queries a stored packet commitment hash. - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_commitments/{sequence} - */ - queryPacketCommitment = (channelId: string, portId: string, sequence: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_commitments/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketReceipt - * @summary PacketReceipt queries if a given packet sequence has been received on the queried chain - * @request GET:/ibc/core/channel/v1beta1/channels/{channelId}/ports/{portId}/packet_receipts/{sequence} - */ - queryPacketReceipt = (channelId: string, portId: string, sequence: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/packet_receipts/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnectionChannels - * @summary ConnectionChannels queries all the channels associated with a connection -end. - * @request GET:/ibc/core/channel/v1beta1/connections/{connection}/channels - */ - queryConnectionChannels = ( - connection: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1beta1/connections/${connection}/channels`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.d.ts deleted file mode 100644 index abb9ac7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export declare const protobufPackage = "ibc.core.channel.v1"; -/** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export declare enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A channel has just started the opening handshake. */ - STATE_INIT = 1, - /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */ - STATE_TRYOPEN = 2, - /** - * STATE_OPEN - A channel has completed the handshake. Open channels are - * ready to send and receive packets. - */ - STATE_OPEN = 3, - /** - * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive - * packets. - */ - STATE_CLOSED = 4, - UNRECOGNIZED = -1 -} -export declare function stateFromJSON(object: any): State; -export declare function stateToJSON(object: State): string; -/** Order defines if a channel is ORDERED or UNORDERED */ -export declare enum Order { - /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */ - ORDER_NONE_UNSPECIFIED = 0, - /** - * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in - * which they were sent. - */ - ORDER_UNORDERED = 1, - /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */ - ORDER_ORDERED = 2, - UNRECOGNIZED = -1 -} -export declare function orderFromJSON(object: any): Order; -export declare function orderToJSON(object: Order): string; -/** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ -export interface Channel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connectionHops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; -} -/** - * IdentifiedChannel defines a channel with additional port and channel - * identifier fields. - */ -export interface IdentifiedChannel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connectionHops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; - /** port identifier */ - portId: string; - /** channel identifier */ - channelId: string; -} -/** Counterparty defines a channel end counterparty */ -export interface Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - portId: string; - /** channel end on the counterparty chain */ - channelId: string; -} -/** Packet defines a type that carries data across different chains through IBC */ -export interface Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - */ - sequence: number; - /** identifies the port on the sending chain. */ - sourcePort: string; - /** identifies the channel end on the sending chain. */ - sourceChannel: string; - /** identifies the port on the receiving chain. */ - destinationPort: string; - /** identifies the channel end on the receiving chain. */ - destinationChannel: string; - /** actual opaque bytes transferred directly to the application module */ - data: Uint8Array; - /** block height after which the packet times out */ - timeoutHeight: Height | undefined; - /** block timestamp (in nanoseconds) after which the packet times out */ - timeoutTimestamp: number; -} -/** - * PacketState defines the generic type necessary to retrieve and store - * packet commitments, acknowledgements, and receipts. - * Caller is responsible for knowing the context necessary to interpret this - * state as a commitment, acknowledgement, or a receipt. - */ -export interface PacketState { - /** channel port identifier. */ - portId: string; - /** channel unique identifier. */ - channelId: string; - /** packet sequence. */ - sequence: number; - /** embedded data that represents packet state. */ - data: Uint8Array; -} -/** - * Acknowledgement is the recommended acknowledgement format to be used by - * app-specific protocols. - * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental - * conflicts with other protobuf message formats used for acknowledgements. - * The first byte of any message with this format will be the non-ASCII values - * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - * https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope - */ -export interface Acknowledgement { - result: Uint8Array | undefined; - error: string | undefined; -} -export declare const Channel: { - encode(message: Channel, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Channel; - fromJSON(object: any): Channel; - toJSON(message: Channel): unknown; - fromPartial(object: DeepPartial): Channel; -}; -export declare const IdentifiedChannel: { - encode(message: IdentifiedChannel, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedChannel; - fromJSON(object: any): IdentifiedChannel; - toJSON(message: IdentifiedChannel): unknown; - fromPartial(object: DeepPartial): IdentifiedChannel; -}; -export declare const Counterparty: { - encode(message: Counterparty, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Counterparty; - fromJSON(object: any): Counterparty; - toJSON(message: Counterparty): unknown; - fromPartial(object: DeepPartial): Counterparty; -}; -export declare const Packet: { - encode(message: Packet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Packet; - fromJSON(object: any): Packet; - toJSON(message: Packet): unknown; - fromPartial(object: DeepPartial): Packet; -}; -export declare const PacketState: { - encode(message: PacketState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PacketState; - fromJSON(object: any): PacketState; - toJSON(message: PacketState): unknown; - fromPartial(object: DeepPartial): PacketState; -}; -export declare const Acknowledgement: { - encode(message: Acknowledgement, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Acknowledgement; - fromJSON(object: any): Acknowledgement; - toJSON(message: Acknowledgement): unknown; - fromPartial(object: DeepPartial): Acknowledgement; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.js deleted file mode 100644 index ea57faa..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.js +++ /dev/null @@ -1,924 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export const protobufPackage = "ibc.core.channel.v1"; -/** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export var State; -(function (State) { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - State[State["STATE_UNINITIALIZED_UNSPECIFIED"] = 0] = "STATE_UNINITIALIZED_UNSPECIFIED"; - /** STATE_INIT - A channel has just started the opening handshake. */ - State[State["STATE_INIT"] = 1] = "STATE_INIT"; - /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */ - State[State["STATE_TRYOPEN"] = 2] = "STATE_TRYOPEN"; - /** - * STATE_OPEN - A channel has completed the handshake. Open channels are - * ready to send and receive packets. - */ - State[State["STATE_OPEN"] = 3] = "STATE_OPEN"; - /** - * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive - * packets. - */ - State[State["STATE_CLOSED"] = 4] = "STATE_CLOSED"; - State[State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(State || (State = {})); -export function stateFromJSON(object) { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case 4: - case "STATE_CLOSED": - return State.STATE_CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} -export function stateToJSON(object) { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.STATE_CLOSED: - return "STATE_CLOSED"; - default: - return "UNKNOWN"; - } -} -/** Order defines if a channel is ORDERED or UNORDERED */ -export var Order; -(function (Order) { - /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */ - Order[Order["ORDER_NONE_UNSPECIFIED"] = 0] = "ORDER_NONE_UNSPECIFIED"; - /** - * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in - * which they were sent. - */ - Order[Order["ORDER_UNORDERED"] = 1] = "ORDER_UNORDERED"; - /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */ - Order[Order["ORDER_ORDERED"] = 2] = "ORDER_ORDERED"; - Order[Order["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(Order || (Order = {})); -export function orderFromJSON(object) { - switch (object) { - case 0: - case "ORDER_NONE_UNSPECIFIED": - return Order.ORDER_NONE_UNSPECIFIED; - case 1: - case "ORDER_UNORDERED": - return Order.ORDER_UNORDERED; - case 2: - case "ORDER_ORDERED": - return Order.ORDER_ORDERED; - case -1: - case "UNRECOGNIZED": - default: - return Order.UNRECOGNIZED; - } -} -export function orderToJSON(object) { - switch (object) { - case Order.ORDER_NONE_UNSPECIFIED: - return "ORDER_NONE_UNSPECIFIED"; - case Order.ORDER_UNORDERED: - return "ORDER_UNORDERED"; - case Order.ORDER_ORDERED: - return "ORDER_ORDERED"; - default: - return "UNKNOWN"; - } -} -const baseChannel = { - state: 0, - ordering: 0, - connectionHops: "", - version: "", -}; -export const Channel = { - encode(message, writer = Writer.create()) { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.connectionHops) { - writer.uint32(34).string(v); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseChannel }; - message.connectionHops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.ordering = reader.int32(); - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseChannel }; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } - else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); - } - else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(String(e)); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } - else { - message.version = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && - (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - if (message.connectionHops) { - obj.connectionHops = message.connectionHops.map((e) => e); - } - else { - obj.connectionHops = []; - } - message.version !== undefined && (obj.version = message.version); - return obj; - }, - fromPartial(object) { - const message = { ...baseChannel }; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } - else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = object.ordering; - } - else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(e); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } - else { - message.version = ""; - } - return message; - }, -}; -const baseIdentifiedChannel = { - state: 0, - ordering: 0, - connectionHops: "", - version: "", - portId: "", - channelId: "", -}; -export const IdentifiedChannel = { - encode(message, writer = Writer.create()) { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.connectionHops) { - writer.uint32(34).string(v); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.portId !== "") { - writer.uint32(50).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(58).string(message.channelId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedChannel }; - message.connectionHops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.ordering = reader.int32(); - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.portId = reader.string(); - break; - case 7: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedChannel }; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } - else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); - } - else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(String(e)); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } - else { - message.version = ""; - } - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && - (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - if (message.connectionHops) { - obj.connectionHops = message.connectionHops.map((e) => e); - } - else { - obj.connectionHops = []; - } - message.version !== undefined && (obj.version = message.version); - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedChannel }; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } - else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = object.ordering; - } - else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(e); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } - else { - message.version = ""; - } - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - return message; - }, -}; -const baseCounterparty = { portId: "", channelId: "" }; -export const Counterparty = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCounterparty }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCounterparty }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object) { - const message = { ...baseCounterparty }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - return message; - }, -}; -const basePacket = { - sequence: 0, - sourcePort: "", - sourceChannel: "", - destinationPort: "", - destinationChannel: "", - timeoutTimestamp: 0, -}; -export const Packet = { - encode(message, writer = Writer.create()) { - if (message.sequence !== 0) { - writer.uint32(8).uint64(message.sequence); - } - if (message.sourcePort !== "") { - writer.uint32(18).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(26).string(message.sourceChannel); - } - if (message.destinationPort !== "") { - writer.uint32(34).string(message.destinationPort); - } - if (message.destinationChannel !== "") { - writer.uint32(42).string(message.destinationChannel); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(58).fork()).ldelim(); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(64).uint64(message.timeoutTimestamp); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacket }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = longToNumber(reader.uint64()); - break; - case 2: - message.sourcePort = reader.string(); - break; - case 3: - message.sourceChannel = reader.string(); - break; - case 4: - message.destinationPort = reader.string(); - break; - case 5: - message.destinationChannel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeoutTimestamp = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePacket }; - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = String(object.sourcePort); - } - else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } - else { - message.sourceChannel = ""; - } - if (object.destinationPort !== undefined && - object.destinationPort !== null) { - message.destinationPort = String(object.destinationPort); - } - else { - message.destinationPort = ""; - } - if (object.destinationChannel !== undefined && - object.destinationChannel !== null) { - message.destinationChannel = String(object.destinationChannel); - } - else { - message.destinationChannel = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromJSON(object.timeoutHeight); - } - else { - message.timeoutHeight = undefined; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } - else { - message.timeoutTimestamp = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sequence !== undefined && (obj.sequence = message.sequence); - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.destinationPort !== undefined && - (obj.destinationPort = message.destinationPort); - message.destinationChannel !== undefined && - (obj.destinationChannel = message.destinationChannel); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight - ? Height.toJSON(message.timeoutHeight) - : undefined); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - return obj; - }, - fromPartial(object) { - const message = { ...basePacket }; - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = object.sourcePort; - } - else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } - else { - message.sourceChannel = ""; - } - if (object.destinationPort !== undefined && - object.destinationPort !== null) { - message.destinationPort = object.destinationPort; - } - else { - message.destinationPort = ""; - } - if (object.destinationChannel !== undefined && - object.destinationChannel !== null) { - message.destinationChannel = object.destinationChannel; - } - else { - message.destinationChannel = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromPartial(object.timeoutHeight); - } - else { - message.timeoutHeight = undefined; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = object.timeoutTimestamp; - } - else { - message.timeoutTimestamp = 0; - } - return message; - }, -}; -const basePacketState = { portId: "", channelId: "", sequence: 0 }; -export const PacketState = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - if (message.data.length !== 0) { - writer.uint32(34).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacketState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64()); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePacketState }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...basePacketState }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseAcknowledgement = {}; -export const Acknowledgement = { - encode(message, writer = Writer.create()) { - if (message.result !== undefined) { - writer.uint32(170).bytes(message.result); - } - if (message.error !== undefined) { - writer.uint32(178).string(message.error); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAcknowledgement }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAcknowledgement }; - if (object.result !== undefined && object.result !== null) { - message.result = bytesFromBase64(object.result); - } - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } - else { - message.error = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.result !== undefined && - (obj.result = - message.result !== undefined - ? base64FromBytes(message.result) - : undefined); - message.error !== undefined && (obj.error = message.error); - return obj; - }, - fromPartial(object) { - const message = { ...baseAcknowledgement }; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } - else { - message.result = undefined; - } - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } - else { - message.error = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts deleted file mode 100644 index 5299631..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts +++ /dev/null @@ -1,1060 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A channel has just started the opening handshake. */ - STATE_INIT = 1, - /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */ - STATE_TRYOPEN = 2, - /** - * STATE_OPEN - A channel has completed the handshake. Open channels are - * ready to send and receive packets. - */ - STATE_OPEN = 3, - /** - * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive - * packets. - */ - STATE_CLOSED = 4, - UNRECOGNIZED = -1, -} - -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case 4: - case "STATE_CLOSED": - return State.STATE_CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} - -export function stateToJSON(object: State): string { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.STATE_CLOSED: - return "STATE_CLOSED"; - default: - return "UNKNOWN"; - } -} - -/** Order defines if a channel is ORDERED or UNORDERED */ -export enum Order { - /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */ - ORDER_NONE_UNSPECIFIED = 0, - /** - * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in - * which they were sent. - */ - ORDER_UNORDERED = 1, - /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */ - ORDER_ORDERED = 2, - UNRECOGNIZED = -1, -} - -export function orderFromJSON(object: any): Order { - switch (object) { - case 0: - case "ORDER_NONE_UNSPECIFIED": - return Order.ORDER_NONE_UNSPECIFIED; - case 1: - case "ORDER_UNORDERED": - return Order.ORDER_UNORDERED; - case 2: - case "ORDER_ORDERED": - return Order.ORDER_ORDERED; - case -1: - case "UNRECOGNIZED": - default: - return Order.UNRECOGNIZED; - } -} - -export function orderToJSON(object: Order): string { - switch (object) { - case Order.ORDER_NONE_UNSPECIFIED: - return "ORDER_NONE_UNSPECIFIED"; - case Order.ORDER_UNORDERED: - return "ORDER_UNORDERED"; - case Order.ORDER_ORDERED: - return "ORDER_ORDERED"; - default: - return "UNKNOWN"; - } -} - -/** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ -export interface Channel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connectionHops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; -} - -/** - * IdentifiedChannel defines a channel with additional port and channel - * identifier fields. - */ -export interface IdentifiedChannel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connectionHops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; - /** port identifier */ - portId: string; - /** channel identifier */ - channelId: string; -} - -/** Counterparty defines a channel end counterparty */ -export interface Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - portId: string; - /** channel end on the counterparty chain */ - channelId: string; -} - -/** Packet defines a type that carries data across different chains through IBC */ -export interface Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - */ - sequence: number; - /** identifies the port on the sending chain. */ - sourcePort: string; - /** identifies the channel end on the sending chain. */ - sourceChannel: string; - /** identifies the port on the receiving chain. */ - destinationPort: string; - /** identifies the channel end on the receiving chain. */ - destinationChannel: string; - /** actual opaque bytes transferred directly to the application module */ - data: Uint8Array; - /** block height after which the packet times out */ - timeoutHeight: Height | undefined; - /** block timestamp (in nanoseconds) after which the packet times out */ - timeoutTimestamp: number; -} - -/** - * PacketState defines the generic type necessary to retrieve and store - * packet commitments, acknowledgements, and receipts. - * Caller is responsible for knowing the context necessary to interpret this - * state as a commitment, acknowledgement, or a receipt. - */ -export interface PacketState { - /** channel port identifier. */ - portId: string; - /** channel unique identifier. */ - channelId: string; - /** packet sequence. */ - sequence: number; - /** embedded data that represents packet state. */ - data: Uint8Array; -} - -/** - * Acknowledgement is the recommended acknowledgement format to be used by - * app-specific protocols. - * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental - * conflicts with other protobuf message formats used for acknowledgements. - * The first byte of any message with this format will be the non-ASCII values - * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - * https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope - */ -export interface Acknowledgement { - result: Uint8Array | undefined; - error: string | undefined; -} - -const baseChannel: object = { - state: 0, - ordering: 0, - connectionHops: "", - version: "", -}; - -export const Channel = { - encode(message: Channel, writer: Writer = Writer.create()): Writer { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.connectionHops) { - writer.uint32(34).string(v!); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Channel { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseChannel } as Channel; - message.connectionHops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32() as any; - break; - case 2: - message.ordering = reader.int32() as any; - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Channel { - const message = { ...baseChannel } as Channel; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(String(e)); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - return message; - }, - - toJSON(message: Channel): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && - (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - if (message.connectionHops) { - obj.connectionHops = message.connectionHops.map((e) => e); - } else { - obj.connectionHops = []; - } - message.version !== undefined && (obj.version = message.version); - return obj; - }, - - fromPartial(object: DeepPartial): Channel { - const message = { ...baseChannel } as Channel; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = object.ordering; - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(e); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - return message; - }, -}; - -const baseIdentifiedChannel: object = { - state: 0, - ordering: 0, - connectionHops: "", - version: "", - portId: "", - channelId: "", -}; - -export const IdentifiedChannel = { - encode(message: IdentifiedChannel, writer: Writer = Writer.create()): Writer { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.connectionHops) { - writer.uint32(34).string(v!); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.portId !== "") { - writer.uint32(50).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(58).string(message.channelId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedChannel { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedChannel } as IdentifiedChannel; - message.connectionHops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32() as any; - break; - case 2: - message.ordering = reader.int32() as any; - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.portId = reader.string(); - break; - case 7: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedChannel { - const message = { ...baseIdentifiedChannel } as IdentifiedChannel; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(String(e)); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - return message; - }, - - toJSON(message: IdentifiedChannel): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && - (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - if (message.connectionHops) { - obj.connectionHops = message.connectionHops.map((e) => e); - } else { - obj.connectionHops = []; - } - message.version !== undefined && (obj.version = message.version); - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - - fromPartial(object: DeepPartial): IdentifiedChannel { - const message = { ...baseIdentifiedChannel } as IdentifiedChannel; - message.connectionHops = []; - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = object.ordering; - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.connectionHops !== undefined && object.connectionHops !== null) { - for (const e of object.connectionHops) { - message.connectionHops.push(e); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - return message; - }, -}; - -const baseCounterparty: object = { portId: "", channelId: "" }; - -export const Counterparty = { - encode(message: Counterparty, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Counterparty { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCounterparty } as Counterparty; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - return message; - }, - - toJSON(message: Counterparty): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - - fromPartial(object: DeepPartial): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - return message; - }, -}; - -const basePacket: object = { - sequence: 0, - sourcePort: "", - sourceChannel: "", - destinationPort: "", - destinationChannel: "", - timeoutTimestamp: 0, -}; - -export const Packet = { - encode(message: Packet, writer: Writer = Writer.create()): Writer { - if (message.sequence !== 0) { - writer.uint32(8).uint64(message.sequence); - } - if (message.sourcePort !== "") { - writer.uint32(18).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(26).string(message.sourceChannel); - } - if (message.destinationPort !== "") { - writer.uint32(34).string(message.destinationPort); - } - if (message.destinationChannel !== "") { - writer.uint32(42).string(message.destinationChannel); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(58).fork()).ldelim(); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(64).uint64(message.timeoutTimestamp); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Packet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacket } as Packet; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = longToNumber(reader.uint64() as Long); - break; - case 2: - message.sourcePort = reader.string(); - break; - case 3: - message.sourceChannel = reader.string(); - break; - case 4: - message.destinationPort = reader.string(); - break; - case 5: - message.destinationChannel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeoutTimestamp = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Packet { - const message = { ...basePacket } as Packet; - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = String(object.sourcePort); - } else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } else { - message.sourceChannel = ""; - } - if ( - object.destinationPort !== undefined && - object.destinationPort !== null - ) { - message.destinationPort = String(object.destinationPort); - } else { - message.destinationPort = ""; - } - if ( - object.destinationChannel !== undefined && - object.destinationChannel !== null - ) { - message.destinationChannel = String(object.destinationChannel); - } else { - message.destinationChannel = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromJSON(object.timeoutHeight); - } else { - message.timeoutHeight = undefined; - } - if ( - object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null - ) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } else { - message.timeoutTimestamp = 0; - } - return message; - }, - - toJSON(message: Packet): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = message.sequence); - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.destinationPort !== undefined && - (obj.destinationPort = message.destinationPort); - message.destinationChannel !== undefined && - (obj.destinationChannel = message.destinationChannel); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight - ? Height.toJSON(message.timeoutHeight) - : undefined); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - return obj; - }, - - fromPartial(object: DeepPartial): Packet { - const message = { ...basePacket } as Packet; - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = object.sourcePort; - } else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } else { - message.sourceChannel = ""; - } - if ( - object.destinationPort !== undefined && - object.destinationPort !== null - ) { - message.destinationPort = object.destinationPort; - } else { - message.destinationPort = ""; - } - if ( - object.destinationChannel !== undefined && - object.destinationChannel !== null - ) { - message.destinationChannel = object.destinationChannel; - } else { - message.destinationChannel = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromPartial(object.timeoutHeight); - } else { - message.timeoutHeight = undefined; - } - if ( - object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null - ) { - message.timeoutTimestamp = object.timeoutTimestamp; - } else { - message.timeoutTimestamp = 0; - } - return message; - }, -}; - -const basePacketState: object = { portId: "", channelId: "", sequence: 0 }; - -export const PacketState = { - encode(message: PacketState, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - if (message.data.length !== 0) { - writer.uint32(34).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PacketState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacketState } as PacketState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PacketState { - const message = { ...basePacketState } as PacketState; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: PacketState): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PacketState { - const message = { ...basePacketState } as PacketState; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseAcknowledgement: object = {}; - -export const Acknowledgement = { - encode(message: Acknowledgement, writer: Writer = Writer.create()): Writer { - if (message.result !== undefined) { - writer.uint32(170).bytes(message.result); - } - if (message.error !== undefined) { - writer.uint32(178).string(message.error); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Acknowledgement { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAcknowledgement } as Acknowledgement; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Acknowledgement { - const message = { ...baseAcknowledgement } as Acknowledgement; - if (object.result !== undefined && object.result !== null) { - message.result = bytesFromBase64(object.result); - } - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } else { - message.error = undefined; - } - return message; - }, - - toJSON(message: Acknowledgement): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = - message.result !== undefined - ? base64FromBytes(message.result) - : undefined); - message.error !== undefined && (obj.error = message.error); - return obj; - }, - - fromPartial(object: DeepPartial): Acknowledgement { - const message = { ...baseAcknowledgement } as Acknowledgement; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = undefined; - } - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } else { - message.error = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.d.ts deleted file mode 100644 index 0c9e893..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { IdentifiedChannel, PacketState } from "../../../../ibc/core/channel/v1/channel"; -export declare const protobufPackage = "ibc.core.channel.v1"; -/** GenesisState defines the ibc channel submodule's genesis state. */ -export interface GenesisState { - channels: IdentifiedChannel[]; - acknowledgements: PacketState[]; - commitments: PacketState[]; - receipts: PacketState[]; - sendSequences: PacketSequence[]; - recvSequences: PacketSequence[]; - ackSequences: PacketSequence[]; - /** the sequence for the next generated channel identifier */ - nextChannelSequence: number; -} -/** - * PacketSequence defines the genesis type necessary to retrieve and store - * next send and receive sequences. - */ -export interface PacketSequence { - portId: string; - channelId: string; - sequence: number; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const PacketSequence: { - encode(message: PacketSequence, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PacketSequence; - fromJSON(object: any): PacketSequence; - toJSON(message: PacketSequence): unknown; - fromPartial(object: DeepPartial): PacketSequence; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.js deleted file mode 100644 index 8401ef7..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.js +++ /dev/null @@ -1,346 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { IdentifiedChannel, PacketState, } from "../../../../ibc/core/channel/v1/channel"; -export const protobufPackage = "ibc.core.channel.v1"; -const baseGenesisState = { nextChannelSequence: 0 }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.channels) { - IdentifiedChannel.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.acknowledgements) { - PacketState.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.commitments) { - PacketState.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.receipts) { - PacketState.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.sendSequences) { - PacketSequence.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.recvSequences) { - PacketSequence.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.ackSequences) { - PacketSequence.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.nextChannelSequence !== 0) { - writer.uint32(64).uint64(message.nextChannelSequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.sendSequences = []; - message.recvSequences = []; - message.ackSequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push(IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.acknowledgements.push(PacketState.decode(reader, reader.uint32())); - break; - case 3: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 4: - message.receipts.push(PacketState.decode(reader, reader.uint32())); - break; - case 5: - message.sendSequences.push(PacketSequence.decode(reader, reader.uint32())); - break; - case 6: - message.recvSequences.push(PacketSequence.decode(reader, reader.uint32())); - break; - case 7: - message.ackSequences.push(PacketSequence.decode(reader, reader.uint32())); - break; - case 8: - message.nextChannelSequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.sendSequences = []; - message.recvSequences = []; - message.ackSequences = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.acknowledgements !== undefined && - object.acknowledgements !== null) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromJSON(e)); - } - } - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromJSON(e)); - } - } - if (object.receipts !== undefined && object.receipts !== null) { - for (const e of object.receipts) { - message.receipts.push(PacketState.fromJSON(e)); - } - } - if (object.sendSequences !== undefined && object.sendSequences !== null) { - for (const e of object.sendSequences) { - message.sendSequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.recvSequences !== undefined && object.recvSequences !== null) { - for (const e of object.recvSequences) { - message.recvSequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.ackSequences !== undefined && object.ackSequences !== null) { - for (const e of object.ackSequences) { - message.ackSequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.nextChannelSequence !== undefined && - object.nextChannelSequence !== null) { - message.nextChannelSequence = Number(object.nextChannelSequence); - } - else { - message.nextChannelSequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => e ? IdentifiedChannel.toJSON(e) : undefined); - } - else { - obj.channels = []; - } - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map((e) => e ? PacketState.toJSON(e) : undefined); - } - else { - obj.acknowledgements = []; - } - if (message.commitments) { - obj.commitments = message.commitments.map((e) => e ? PacketState.toJSON(e) : undefined); - } - else { - obj.commitments = []; - } - if (message.receipts) { - obj.receipts = message.receipts.map((e) => e ? PacketState.toJSON(e) : undefined); - } - else { - obj.receipts = []; - } - if (message.sendSequences) { - obj.sendSequences = message.sendSequences.map((e) => e ? PacketSequence.toJSON(e) : undefined); - } - else { - obj.sendSequences = []; - } - if (message.recvSequences) { - obj.recvSequences = message.recvSequences.map((e) => e ? PacketSequence.toJSON(e) : undefined); - } - else { - obj.recvSequences = []; - } - if (message.ackSequences) { - obj.ackSequences = message.ackSequences.map((e) => e ? PacketSequence.toJSON(e) : undefined); - } - else { - obj.ackSequences = []; - } - message.nextChannelSequence !== undefined && - (obj.nextChannelSequence = message.nextChannelSequence); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.sendSequences = []; - message.recvSequences = []; - message.ackSequences = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.acknowledgements !== undefined && - object.acknowledgements !== null) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromPartial(e)); - } - } - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromPartial(e)); - } - } - if (object.receipts !== undefined && object.receipts !== null) { - for (const e of object.receipts) { - message.receipts.push(PacketState.fromPartial(e)); - } - } - if (object.sendSequences !== undefined && object.sendSequences !== null) { - for (const e of object.sendSequences) { - message.sendSequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.recvSequences !== undefined && object.recvSequences !== null) { - for (const e of object.recvSequences) { - message.recvSequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.ackSequences !== undefined && object.ackSequences !== null) { - for (const e of object.ackSequences) { - message.ackSequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.nextChannelSequence !== undefined && - object.nextChannelSequence !== null) { - message.nextChannelSequence = object.nextChannelSequence; - } - else { - message.nextChannelSequence = 0; - } - return message; - }, -}; -const basePacketSequence = { portId: "", channelId: "", sequence: 0 }; -export const PacketSequence = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacketSequence }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePacketSequence }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - fromPartial(object) { - const message = { ...basePacketSequence }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts deleted file mode 100644 index 5729159..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - IdentifiedChannel, - PacketState, -} from "../../../../ibc/core/channel/v1/channel"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** GenesisState defines the ibc channel submodule's genesis state. */ -export interface GenesisState { - channels: IdentifiedChannel[]; - acknowledgements: PacketState[]; - commitments: PacketState[]; - receipts: PacketState[]; - sendSequences: PacketSequence[]; - recvSequences: PacketSequence[]; - ackSequences: PacketSequence[]; - /** the sequence for the next generated channel identifier */ - nextChannelSequence: number; -} - -/** - * PacketSequence defines the genesis type necessary to retrieve and store - * next send and receive sequences. - */ -export interface PacketSequence { - portId: string; - channelId: string; - sequence: number; -} - -const baseGenesisState: object = { nextChannelSequence: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.acknowledgements) { - PacketState.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.commitments) { - PacketState.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.receipts) { - PacketState.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.sendSequences) { - PacketSequence.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.recvSequences) { - PacketSequence.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.ackSequences) { - PacketSequence.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.nextChannelSequence !== 0) { - writer.uint32(64).uint64(message.nextChannelSequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.sendSequences = []; - message.recvSequences = []; - message.ackSequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push( - IdentifiedChannel.decode(reader, reader.uint32()) - ); - break; - case 2: - message.acknowledgements.push( - PacketState.decode(reader, reader.uint32()) - ); - break; - case 3: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 4: - message.receipts.push(PacketState.decode(reader, reader.uint32())); - break; - case 5: - message.sendSequences.push( - PacketSequence.decode(reader, reader.uint32()) - ); - break; - case 6: - message.recvSequences.push( - PacketSequence.decode(reader, reader.uint32()) - ); - break; - case 7: - message.ackSequences.push( - PacketSequence.decode(reader, reader.uint32()) - ); - break; - case 8: - message.nextChannelSequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.sendSequences = []; - message.recvSequences = []; - message.ackSequences = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromJSON(e)); - } - } - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromJSON(e)); - } - } - if (object.receipts !== undefined && object.receipts !== null) { - for (const e of object.receipts) { - message.receipts.push(PacketState.fromJSON(e)); - } - } - if (object.sendSequences !== undefined && object.sendSequences !== null) { - for (const e of object.sendSequences) { - message.sendSequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.recvSequences !== undefined && object.recvSequences !== null) { - for (const e of object.recvSequences) { - message.recvSequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.ackSequences !== undefined && object.ackSequences !== null) { - for (const e of object.ackSequences) { - message.ackSequences.push(PacketSequence.fromJSON(e)); - } - } - if ( - object.nextChannelSequence !== undefined && - object.nextChannelSequence !== null - ) { - message.nextChannelSequence = Number(object.nextChannelSequence); - } else { - message.nextChannelSequence = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => - e ? IdentifiedChannel.toJSON(e) : undefined - ); - } else { - obj.channels = []; - } - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.acknowledgements = []; - } - if (message.commitments) { - obj.commitments = message.commitments.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.commitments = []; - } - if (message.receipts) { - obj.receipts = message.receipts.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.receipts = []; - } - if (message.sendSequences) { - obj.sendSequences = message.sendSequences.map((e) => - e ? PacketSequence.toJSON(e) : undefined - ); - } else { - obj.sendSequences = []; - } - if (message.recvSequences) { - obj.recvSequences = message.recvSequences.map((e) => - e ? PacketSequence.toJSON(e) : undefined - ); - } else { - obj.recvSequences = []; - } - if (message.ackSequences) { - obj.ackSequences = message.ackSequences.map((e) => - e ? PacketSequence.toJSON(e) : undefined - ); - } else { - obj.ackSequences = []; - } - message.nextChannelSequence !== undefined && - (obj.nextChannelSequence = message.nextChannelSequence); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.sendSequences = []; - message.recvSequences = []; - message.ackSequences = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromPartial(e)); - } - } - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromPartial(e)); - } - } - if (object.receipts !== undefined && object.receipts !== null) { - for (const e of object.receipts) { - message.receipts.push(PacketState.fromPartial(e)); - } - } - if (object.sendSequences !== undefined && object.sendSequences !== null) { - for (const e of object.sendSequences) { - message.sendSequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.recvSequences !== undefined && object.recvSequences !== null) { - for (const e of object.recvSequences) { - message.recvSequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.ackSequences !== undefined && object.ackSequences !== null) { - for (const e of object.ackSequences) { - message.ackSequences.push(PacketSequence.fromPartial(e)); - } - } - if ( - object.nextChannelSequence !== undefined && - object.nextChannelSequence !== null - ) { - message.nextChannelSequence = object.nextChannelSequence; - } else { - message.nextChannelSequence = 0; - } - return message; - }, -}; - -const basePacketSequence: object = { portId: "", channelId: "", sequence: 0 }; - -export const PacketSequence = { - encode(message: PacketSequence, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PacketSequence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacketSequence } as PacketSequence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PacketSequence { - const message = { ...basePacketSequence } as PacketSequence; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: PacketSequence): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): PacketSequence { - const message = { ...basePacketSequence } as PacketSequence; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.d.ts deleted file mode 100644 index a7043ef..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.d.ts +++ /dev/null @@ -1,556 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Channel, IdentifiedChannel, PacketState } from "../../../../ibc/core/channel/v1/channel"; -import { Height, IdentifiedClientState } from "../../../../ibc/core/client/v1/client"; -import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.channel.v1"; -/** QueryChannelRequest is the request type for the Query/Channel RPC method */ -export interface QueryChannelRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} -/** - * QueryChannelResponse is the response type for the Query/Channel RPC method. - * Besides the Channel end, it includes a proof and the height from which the - * proof was retrieved. - */ -export interface QueryChannelResponse { - /** channel associated with the request identifiers */ - channel: Channel | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ -export interface QueryChannelsRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} -/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ -export interface QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -/** - * QueryConnectionChannelsRequest is the request type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsRequest { - /** connection unique identifier */ - connection: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -/** - * QueryConnectionChannelsResponse is the Response type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -/** - * QueryChannelClientStateRequest is the request type for the Query/ClientState - * RPC method - */ -export interface QueryChannelClientStateRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelClientStateResponse { - /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryChannelConsensusStateRequest is the request type for the - * Query/ConsensusState RPC method - */ -export interface QueryChannelConsensusStateRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** revision number of the consensus state */ - revisionNumber: number; - /** revision height of the consensus state */ - revisionHeight: number; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelConsensusStateResponse { - /** consensus state associated with the channel */ - consensusState: Any | undefined; - /** client ID associated with the consensus state */ - clientId: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryPacketCommitmentRequest is the request type for the - * Query/PacketCommitment RPC method - */ -export interface QueryPacketCommitmentRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: number; -} -/** - * QueryPacketCommitmentResponse defines the client query response for a packet - * which also includes a proof and the height from which the proof was - * retrieved - */ -export interface QueryPacketCommitmentResponse { - /** packet associated with the request fields */ - commitment: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryPacketCommitmentsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -/** - * QueryPacketCommitmentsResponse is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsResponse { - commitments: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -/** - * QueryPacketReceiptRequest is the request type for the - * Query/PacketReceipt RPC method - */ -export interface QueryPacketReceiptRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: number; -} -/** - * QueryPacketReceiptResponse defines the client query response for a packet receipt - * which also includes a proof, and the height from which the proof was - * retrieved - */ -export interface QueryPacketReceiptResponse { - /** success flag for if receipt exists */ - received: boolean; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryPacketAcknowledgementRequest is the request type for the - * Query/PacketAcknowledgement RPC method - */ -export interface QueryPacketAcknowledgementRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: number; -} -/** - * QueryPacketAcknowledgementResponse defines the client query response for a - * packet which also includes a proof and the height from which the - * proof was retrieved - */ -export interface QueryPacketAcknowledgementResponse { - /** packet associated with the request fields */ - acknowledgement: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryPacketAcknowledgementsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketAcknowledgementsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -/** - * QueryPacketAcknowledgemetsResponse is the request type for the - * Query/QueryPacketAcknowledgements RPC method - */ -export interface QueryPacketAcknowledgementsResponse { - acknowledgements: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -/** - * QueryUnreceivedPacketsRequest is the request type for the - * Query/UnreceivedPackets RPC method - */ -export interface QueryUnreceivedPacketsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** list of packet sequences */ - packetCommitmentSequences: number[]; -} -/** - * QueryUnreceivedPacketsResponse is the response type for the - * Query/UnreceivedPacketCommitments RPC method - */ -export interface QueryUnreceivedPacketsResponse { - /** list of unreceived packet sequences */ - sequences: number[]; - /** query block height */ - height: Height | undefined; -} -/** - * QueryUnreceivedAcks is the request type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** list of acknowledgement sequences */ - packetAckSequences: number[]; -} -/** - * QueryUnreceivedAcksResponse is the response type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksResponse { - /** list of unreceived acknowledgement sequences */ - sequences: number[]; - /** query block height */ - height: Height | undefined; -} -/** - * QueryNextSequenceReceiveRequest is the request type for the - * Query/QueryNextSequenceReceiveRequest RPC method - */ -export interface QueryNextSequenceReceiveRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} -/** - * QuerySequenceResponse is the request type for the - * Query/QueryNextSequenceReceiveResponse RPC method - */ -export interface QueryNextSequenceReceiveResponse { - /** next sequence receive number */ - nextSequenceReceive: number; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export declare const QueryChannelRequest: { - encode(message: QueryChannelRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelRequest; - fromJSON(object: any): QueryChannelRequest; - toJSON(message: QueryChannelRequest): unknown; - fromPartial(object: DeepPartial): QueryChannelRequest; -}; -export declare const QueryChannelResponse: { - encode(message: QueryChannelResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelResponse; - fromJSON(object: any): QueryChannelResponse; - toJSON(message: QueryChannelResponse): unknown; - fromPartial(object: DeepPartial): QueryChannelResponse; -}; -export declare const QueryChannelsRequest: { - encode(message: QueryChannelsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelsRequest; - fromJSON(object: any): QueryChannelsRequest; - toJSON(message: QueryChannelsRequest): unknown; - fromPartial(object: DeepPartial): QueryChannelsRequest; -}; -export declare const QueryChannelsResponse: { - encode(message: QueryChannelsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelsResponse; - fromJSON(object: any): QueryChannelsResponse; - toJSON(message: QueryChannelsResponse): unknown; - fromPartial(object: DeepPartial): QueryChannelsResponse; -}; -export declare const QueryConnectionChannelsRequest: { - encode(message: QueryConnectionChannelsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionChannelsRequest; - fromJSON(object: any): QueryConnectionChannelsRequest; - toJSON(message: QueryConnectionChannelsRequest): unknown; - fromPartial(object: DeepPartial): QueryConnectionChannelsRequest; -}; -export declare const QueryConnectionChannelsResponse: { - encode(message: QueryConnectionChannelsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionChannelsResponse; - fromJSON(object: any): QueryConnectionChannelsResponse; - toJSON(message: QueryConnectionChannelsResponse): unknown; - fromPartial(object: DeepPartial): QueryConnectionChannelsResponse; -}; -export declare const QueryChannelClientStateRequest: { - encode(message: QueryChannelClientStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelClientStateRequest; - fromJSON(object: any): QueryChannelClientStateRequest; - toJSON(message: QueryChannelClientStateRequest): unknown; - fromPartial(object: DeepPartial): QueryChannelClientStateRequest; -}; -export declare const QueryChannelClientStateResponse: { - encode(message: QueryChannelClientStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelClientStateResponse; - fromJSON(object: any): QueryChannelClientStateResponse; - toJSON(message: QueryChannelClientStateResponse): unknown; - fromPartial(object: DeepPartial): QueryChannelClientStateResponse; -}; -export declare const QueryChannelConsensusStateRequest: { - encode(message: QueryChannelConsensusStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelConsensusStateRequest; - fromJSON(object: any): QueryChannelConsensusStateRequest; - toJSON(message: QueryChannelConsensusStateRequest): unknown; - fromPartial(object: DeepPartial): QueryChannelConsensusStateRequest; -}; -export declare const QueryChannelConsensusStateResponse: { - encode(message: QueryChannelConsensusStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryChannelConsensusStateResponse; - fromJSON(object: any): QueryChannelConsensusStateResponse; - toJSON(message: QueryChannelConsensusStateResponse): unknown; - fromPartial(object: DeepPartial): QueryChannelConsensusStateResponse; -}; -export declare const QueryPacketCommitmentRequest: { - encode(message: QueryPacketCommitmentRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketCommitmentRequest; - fromJSON(object: any): QueryPacketCommitmentRequest; - toJSON(message: QueryPacketCommitmentRequest): unknown; - fromPartial(object: DeepPartial): QueryPacketCommitmentRequest; -}; -export declare const QueryPacketCommitmentResponse: { - encode(message: QueryPacketCommitmentResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketCommitmentResponse; - fromJSON(object: any): QueryPacketCommitmentResponse; - toJSON(message: QueryPacketCommitmentResponse): unknown; - fromPartial(object: DeepPartial): QueryPacketCommitmentResponse; -}; -export declare const QueryPacketCommitmentsRequest: { - encode(message: QueryPacketCommitmentsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketCommitmentsRequest; - fromJSON(object: any): QueryPacketCommitmentsRequest; - toJSON(message: QueryPacketCommitmentsRequest): unknown; - fromPartial(object: DeepPartial): QueryPacketCommitmentsRequest; -}; -export declare const QueryPacketCommitmentsResponse: { - encode(message: QueryPacketCommitmentsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketCommitmentsResponse; - fromJSON(object: any): QueryPacketCommitmentsResponse; - toJSON(message: QueryPacketCommitmentsResponse): unknown; - fromPartial(object: DeepPartial): QueryPacketCommitmentsResponse; -}; -export declare const QueryPacketReceiptRequest: { - encode(message: QueryPacketReceiptRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketReceiptRequest; - fromJSON(object: any): QueryPacketReceiptRequest; - toJSON(message: QueryPacketReceiptRequest): unknown; - fromPartial(object: DeepPartial): QueryPacketReceiptRequest; -}; -export declare const QueryPacketReceiptResponse: { - encode(message: QueryPacketReceiptResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketReceiptResponse; - fromJSON(object: any): QueryPacketReceiptResponse; - toJSON(message: QueryPacketReceiptResponse): unknown; - fromPartial(object: DeepPartial): QueryPacketReceiptResponse; -}; -export declare const QueryPacketAcknowledgementRequest: { - encode(message: QueryPacketAcknowledgementRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketAcknowledgementRequest; - fromJSON(object: any): QueryPacketAcknowledgementRequest; - toJSON(message: QueryPacketAcknowledgementRequest): unknown; - fromPartial(object: DeepPartial): QueryPacketAcknowledgementRequest; -}; -export declare const QueryPacketAcknowledgementResponse: { - encode(message: QueryPacketAcknowledgementResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketAcknowledgementResponse; - fromJSON(object: any): QueryPacketAcknowledgementResponse; - toJSON(message: QueryPacketAcknowledgementResponse): unknown; - fromPartial(object: DeepPartial): QueryPacketAcknowledgementResponse; -}; -export declare const QueryPacketAcknowledgementsRequest: { - encode(message: QueryPacketAcknowledgementsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketAcknowledgementsRequest; - fromJSON(object: any): QueryPacketAcknowledgementsRequest; - toJSON(message: QueryPacketAcknowledgementsRequest): unknown; - fromPartial(object: DeepPartial): QueryPacketAcknowledgementsRequest; -}; -export declare const QueryPacketAcknowledgementsResponse: { - encode(message: QueryPacketAcknowledgementsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPacketAcknowledgementsResponse; - fromJSON(object: any): QueryPacketAcknowledgementsResponse; - toJSON(message: QueryPacketAcknowledgementsResponse): unknown; - fromPartial(object: DeepPartial): QueryPacketAcknowledgementsResponse; -}; -export declare const QueryUnreceivedPacketsRequest: { - encode(message: QueryUnreceivedPacketsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnreceivedPacketsRequest; - fromJSON(object: any): QueryUnreceivedPacketsRequest; - toJSON(message: QueryUnreceivedPacketsRequest): unknown; - fromPartial(object: DeepPartial): QueryUnreceivedPacketsRequest; -}; -export declare const QueryUnreceivedPacketsResponse: { - encode(message: QueryUnreceivedPacketsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnreceivedPacketsResponse; - fromJSON(object: any): QueryUnreceivedPacketsResponse; - toJSON(message: QueryUnreceivedPacketsResponse): unknown; - fromPartial(object: DeepPartial): QueryUnreceivedPacketsResponse; -}; -export declare const QueryUnreceivedAcksRequest: { - encode(message: QueryUnreceivedAcksRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnreceivedAcksRequest; - fromJSON(object: any): QueryUnreceivedAcksRequest; - toJSON(message: QueryUnreceivedAcksRequest): unknown; - fromPartial(object: DeepPartial): QueryUnreceivedAcksRequest; -}; -export declare const QueryUnreceivedAcksResponse: { - encode(message: QueryUnreceivedAcksResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnreceivedAcksResponse; - fromJSON(object: any): QueryUnreceivedAcksResponse; - toJSON(message: QueryUnreceivedAcksResponse): unknown; - fromPartial(object: DeepPartial): QueryUnreceivedAcksResponse; -}; -export declare const QueryNextSequenceReceiveRequest: { - encode(message: QueryNextSequenceReceiveRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryNextSequenceReceiveRequest; - fromJSON(object: any): QueryNextSequenceReceiveRequest; - toJSON(message: QueryNextSequenceReceiveRequest): unknown; - fromPartial(object: DeepPartial): QueryNextSequenceReceiveRequest; -}; -export declare const QueryNextSequenceReceiveResponse: { - encode(message: QueryNextSequenceReceiveResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryNextSequenceReceiveResponse; - fromJSON(object: any): QueryNextSequenceReceiveResponse; - toJSON(message: QueryNextSequenceReceiveResponse): unknown; - fromPartial(object: DeepPartial): QueryNextSequenceReceiveResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Channel queries an IBC Channel. */ - Channel(request: QueryChannelRequest): Promise; - /** Channels queries all the IBC channels of a chain. */ - Channels(request: QueryChannelsRequest): Promise; - /** - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - ConnectionChannels(request: QueryConnectionChannelsRequest): Promise; - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - ChannelClientState(request: QueryChannelClientStateRequest): Promise; - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - ChannelConsensusState(request: QueryChannelConsensusStateRequest): Promise; - /** PacketCommitment queries a stored packet commitment hash. */ - PacketCommitment(request: QueryPacketCommitmentRequest): Promise; - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - PacketCommitments(request: QueryPacketCommitmentsRequest): Promise; - /** PacketReceipt queries if a given packet sequence has been received on the queried chain */ - PacketReceipt(request: QueryPacketReceiptRequest): Promise; - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */ - PacketAcknowledgement(request: QueryPacketAcknowledgementRequest): Promise; - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - PacketAcknowledgements(request: QueryPacketAcknowledgementsRequest): Promise; - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - UnreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise; - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a - * channel and sequences. - */ - UnreceivedAcks(request: QueryUnreceivedAcksRequest): Promise; - /** NextSequenceReceive returns the next receive sequence for a given channel. */ - NextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Channel(request: QueryChannelRequest): Promise; - Channels(request: QueryChannelsRequest): Promise; - ConnectionChannels(request: QueryConnectionChannelsRequest): Promise; - ChannelClientState(request: QueryChannelClientStateRequest): Promise; - ChannelConsensusState(request: QueryChannelConsensusStateRequest): Promise; - PacketCommitment(request: QueryPacketCommitmentRequest): Promise; - PacketCommitments(request: QueryPacketCommitmentsRequest): Promise; - PacketReceipt(request: QueryPacketReceiptRequest): Promise; - PacketAcknowledgement(request: QueryPacketAcknowledgementRequest): Promise; - PacketAcknowledgements(request: QueryPacketAcknowledgementsRequest): Promise; - UnreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise; - UnreceivedAcks(request: QueryUnreceivedAcksRequest): Promise; - NextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.js deleted file mode 100644 index 9a65962..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.js +++ /dev/null @@ -1,2631 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Channel, IdentifiedChannel, PacketState, } from "../../../../ibc/core/channel/v1/channel"; -import { Height, IdentifiedClientState, } from "../../../../ibc/core/client/v1/client"; -import { PageRequest, PageResponse, } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.channel.v1"; -const baseQueryChannelRequest = { portId: "", channelId: "" }; -export const QueryChannelRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryChannelRequest }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryChannelRequest }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - return message; - }, -}; -const baseQueryChannelResponse = {}; -export const QueryChannelResponse = { - encode(message, writer = Writer.create()) { - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryChannelResponse }; - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } - else { - message.channel = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryChannelResponse }; - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } - else { - message.channel = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryChannelsRequest = {}; -export const QueryChannelsRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryChannelsRequest }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryChannelsRequest }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryChannelsResponse = {}; -export const QueryChannelsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.channels) { - IdentifiedChannel.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelsResponse }; - message.channels = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push(IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryChannelsResponse }; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => e ? IdentifiedChannel.toJSON(e) : undefined); - } - else { - obj.channels = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryChannelsResponse }; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryConnectionChannelsRequest = { connection: "" }; -export const QueryConnectionChannelsRequest = { - encode(message, writer = Writer.create()) { - if (message.connection !== "") { - writer.uint32(10).string(message.connection); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionChannelsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionChannelsRequest, - }; - if (object.connection !== undefined && object.connection !== null) { - message.connection = String(object.connection); - } - else { - message.connection = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connection !== undefined && (obj.connection = message.connection); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionChannelsRequest, - }; - if (object.connection !== undefined && object.connection !== null) { - message.connection = object.connection; - } - else { - message.connection = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryConnectionChannelsResponse = {}; -export const QueryConnectionChannelsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.channels) { - IdentifiedChannel.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionChannelsResponse, - }; - message.channels = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push(IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionChannelsResponse, - }; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => e ? IdentifiedChannel.toJSON(e) : undefined); - } - else { - obj.channels = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionChannelsResponse, - }; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryChannelClientStateRequest = { - portId: "", - channelId: "", -}; -export const QueryChannelClientStateRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelClientStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryChannelClientStateRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryChannelClientStateRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - return message; - }, -}; -const baseQueryChannelClientStateResponse = {}; -export const QueryChannelClientStateResponse = { - encode(message, writer = Writer.create()) { - if (message.identifiedClientState !== undefined) { - IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelClientStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifiedClientState = IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryChannelClientStateResponse, - }; - if (object.identifiedClientState !== undefined && - object.identifiedClientState !== null) { - message.identifiedClientState = IdentifiedClientState.fromJSON(object.identifiedClientState); - } - else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.identifiedClientState !== undefined && - (obj.identifiedClientState = message.identifiedClientState - ? IdentifiedClientState.toJSON(message.identifiedClientState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryChannelClientStateResponse, - }; - if (object.identifiedClientState !== undefined && - object.identifiedClientState !== null) { - message.identifiedClientState = IdentifiedClientState.fromPartial(object.identifiedClientState); - } - else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryChannelConsensusStateRequest = { - portId: "", - channelId: "", - revisionNumber: 0, - revisionHeight: 0, -}; -export const QueryChannelConsensusStateRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.revisionNumber !== 0) { - writer.uint32(24).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(32).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelConsensusStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 4: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryChannelConsensusStateRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryChannelConsensusStateRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseQueryChannelConsensusStateResponse = { clientId: "" }; -export const QueryChannelConsensusStateResponse = { - encode(message, writer = Writer.create()) { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelConsensusStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryChannelConsensusStateResponse, - }; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryChannelConsensusStateResponse, - }; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryPacketCommitmentRequest = { - portId: "", - channelId: "", - sequence: 0, -}; -export const QueryPacketCommitmentRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketCommitmentRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketCommitmentRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - return message; - }, -}; -const baseQueryPacketCommitmentResponse = {}; -export const QueryPacketCommitmentResponse = { - encode(message, writer = Writer.create()) { - if (message.commitment.length !== 0) { - writer.uint32(10).bytes(message.commitment); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitment = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketCommitmentResponse, - }; - if (object.commitment !== undefined && object.commitment !== null) { - message.commitment = bytesFromBase64(object.commitment); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.commitment !== undefined && - (obj.commitment = base64FromBytes(message.commitment !== undefined ? message.commitment : new Uint8Array())); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketCommitmentResponse, - }; - if (object.commitment !== undefined && object.commitment !== null) { - message.commitment = object.commitment; - } - else { - message.commitment = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryPacketCommitmentsRequest = { portId: "", channelId: "" }; -export const QueryPacketCommitmentsRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketCommitmentsRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketCommitmentsRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryPacketCommitmentsResponse = {}; -export const QueryPacketCommitmentsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.commitments) { - PacketState.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentsResponse, - }; - message.commitments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketCommitmentsResponse, - }; - message.commitments = []; - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.commitments) { - obj.commitments = message.commitments.map((e) => e ? PacketState.toJSON(e) : undefined); - } - else { - obj.commitments = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketCommitmentsResponse, - }; - message.commitments = []; - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryPacketReceiptRequest = { - portId: "", - channelId: "", - sequence: 0, -}; -export const QueryPacketReceiptRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketReceiptRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketReceiptRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketReceiptRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - return message; - }, -}; -const baseQueryPacketReceiptResponse = { received: false }; -export const QueryPacketReceiptResponse = { - encode(message, writer = Writer.create()) { - if (message.received === true) { - writer.uint32(16).bool(message.received); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketReceiptResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.received = reader.bool(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketReceiptResponse, - }; - if (object.received !== undefined && object.received !== null) { - message.received = Boolean(object.received); - } - else { - message.received = false; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.received !== undefined && (obj.received = message.received); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketReceiptResponse, - }; - if (object.received !== undefined && object.received !== null) { - message.received = object.received; - } - else { - message.received = false; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryPacketAcknowledgementRequest = { - portId: "", - channelId: "", - sequence: 0, -}; -export const QueryPacketAcknowledgementRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketAcknowledgementRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketAcknowledgementRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - return message; - }, -}; -const baseQueryPacketAcknowledgementResponse = {}; -export const QueryPacketAcknowledgementResponse = { - encode(message, writer = Writer.create()) { - if (message.acknowledgement.length !== 0) { - writer.uint32(10).bytes(message.acknowledgement); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgement = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketAcknowledgementResponse, - }; - if (object.acknowledgement !== undefined && - object.acknowledgement !== null) { - message.acknowledgement = bytesFromBase64(object.acknowledgement); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.acknowledgement !== undefined && - (obj.acknowledgement = base64FromBytes(message.acknowledgement !== undefined - ? message.acknowledgement - : new Uint8Array())); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketAcknowledgementResponse, - }; - if (object.acknowledgement !== undefined && - object.acknowledgement !== null) { - message.acknowledgement = object.acknowledgement; - } - else { - message.acknowledgement = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryPacketAcknowledgementsRequest = { - portId: "", - channelId: "", -}; -export const QueryPacketAcknowledgementsRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketAcknowledgementsRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketAcknowledgementsRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryPacketAcknowledgementsResponse = {}; -export const QueryPacketAcknowledgementsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.acknowledgements) { - PacketState.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementsResponse, - }; - message.acknowledgements = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgements.push(PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPacketAcknowledgementsResponse, - }; - message.acknowledgements = []; - if (object.acknowledgements !== undefined && - object.acknowledgements !== null) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map((e) => e ? PacketState.toJSON(e) : undefined); - } - else { - obj.acknowledgements = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPacketAcknowledgementsResponse, - }; - message.acknowledgements = []; - if (object.acknowledgements !== undefined && - object.acknowledgements !== null) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryUnreceivedPacketsRequest = { - portId: "", - channelId: "", - packetCommitmentSequences: 0, -}; -export const QueryUnreceivedPacketsRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - writer.uint32(26).fork(); - for (const v of message.packetCommitmentSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedPacketsRequest, - }; - message.packetCommitmentSequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetCommitmentSequences.push(longToNumber(reader.uint64())); - } - } - else { - message.packetCommitmentSequences.push(longToNumber(reader.uint64())); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnreceivedPacketsRequest, - }; - message.packetCommitmentSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.packetCommitmentSequences !== undefined && - object.packetCommitmentSequences !== null) { - for (const e of object.packetCommitmentSequences) { - message.packetCommitmentSequences.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - if (message.packetCommitmentSequences) { - obj.packetCommitmentSequences = message.packetCommitmentSequences.map((e) => e); - } - else { - obj.packetCommitmentSequences = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnreceivedPacketsRequest, - }; - message.packetCommitmentSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.packetCommitmentSequences !== undefined && - object.packetCommitmentSequences !== null) { - for (const e of object.packetCommitmentSequences) { - message.packetCommitmentSequences.push(e); - } - } - return message; - }, -}; -const baseQueryUnreceivedPacketsResponse = { sequences: 0 }; -export const QueryUnreceivedPacketsResponse = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedPacketsResponse, - }; - message.sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(longToNumber(reader.uint64())); - } - } - else { - message.sequences.push(longToNumber(reader.uint64())); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnreceivedPacketsResponse, - }; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Number(e)); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e); - } - else { - obj.sequences = []; - } - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnreceivedPacketsResponse, - }; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(e); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryUnreceivedAcksRequest = { - portId: "", - channelId: "", - packetAckSequences: 0, -}; -export const QueryUnreceivedAcksRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - writer.uint32(26).fork(); - for (const v of message.packetAckSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedAcksRequest, - }; - message.packetAckSequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetAckSequences.push(longToNumber(reader.uint64())); - } - } - else { - message.packetAckSequences.push(longToNumber(reader.uint64())); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnreceivedAcksRequest, - }; - message.packetAckSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.packetAckSequences !== undefined && - object.packetAckSequences !== null) { - for (const e of object.packetAckSequences) { - message.packetAckSequences.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - if (message.packetAckSequences) { - obj.packetAckSequences = message.packetAckSequences.map((e) => e); - } - else { - obj.packetAckSequences = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnreceivedAcksRequest, - }; - message.packetAckSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.packetAckSequences !== undefined && - object.packetAckSequences !== null) { - for (const e of object.packetAckSequences) { - message.packetAckSequences.push(e); - } - } - return message; - }, -}; -const baseQueryUnreceivedAcksResponse = { sequences: 0 }; -export const QueryUnreceivedAcksResponse = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedAcksResponse, - }; - message.sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(longToNumber(reader.uint64())); - } - } - else { - message.sequences.push(longToNumber(reader.uint64())); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnreceivedAcksResponse, - }; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Number(e)); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e); - } - else { - obj.sequences = []; - } - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnreceivedAcksResponse, - }; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(e); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryNextSequenceReceiveRequest = { - portId: "", - channelId: "", -}; -export const QueryNextSequenceReceiveRequest = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryNextSequenceReceiveRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryNextSequenceReceiveRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryNextSequenceReceiveRequest, - }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - return message; - }, -}; -const baseQueryNextSequenceReceiveResponse = { nextSequenceReceive: 0 }; -export const QueryNextSequenceReceiveResponse = { - encode(message, writer = Writer.create()) { - if (message.nextSequenceReceive !== 0) { - writer.uint32(8).uint64(message.nextSequenceReceive); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryNextSequenceReceiveResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextSequenceReceive = longToNumber(reader.uint64()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryNextSequenceReceiveResponse, - }; - if (object.nextSequenceReceive !== undefined && - object.nextSequenceReceive !== null) { - message.nextSequenceReceive = Number(object.nextSequenceReceive); - } - else { - message.nextSequenceReceive = 0; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextSequenceReceive !== undefined && - (obj.nextSequenceReceive = message.nextSequenceReceive); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryNextSequenceReceiveResponse, - }; - if (object.nextSequenceReceive !== undefined && - object.nextSequenceReceive !== null) { - message.nextSequenceReceive = object.nextSequenceReceive; - } - else { - message.nextSequenceReceive = 0; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Channel(request) { - const data = QueryChannelRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "Channel", data); - return promise.then((data) => QueryChannelResponse.decode(new Reader(data))); - } - Channels(request) { - const data = QueryChannelsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "Channels", data); - return promise.then((data) => QueryChannelsResponse.decode(new Reader(data))); - } - ConnectionChannels(request) { - const data = QueryConnectionChannelsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "ConnectionChannels", data); - return promise.then((data) => QueryConnectionChannelsResponse.decode(new Reader(data))); - } - ChannelClientState(request) { - const data = QueryChannelClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "ChannelClientState", data); - return promise.then((data) => QueryChannelClientStateResponse.decode(new Reader(data))); - } - ChannelConsensusState(request) { - const data = QueryChannelConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "ChannelConsensusState", data); - return promise.then((data) => QueryChannelConsensusStateResponse.decode(new Reader(data))); - } - PacketCommitment(request) { - const data = QueryPacketCommitmentRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketCommitment", data); - return promise.then((data) => QueryPacketCommitmentResponse.decode(new Reader(data))); - } - PacketCommitments(request) { - const data = QueryPacketCommitmentsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketCommitments", data); - return promise.then((data) => QueryPacketCommitmentsResponse.decode(new Reader(data))); - } - PacketReceipt(request) { - const data = QueryPacketReceiptRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketReceipt", data); - return promise.then((data) => QueryPacketReceiptResponse.decode(new Reader(data))); - } - PacketAcknowledgement(request) { - const data = QueryPacketAcknowledgementRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketAcknowledgement", data); - return promise.then((data) => QueryPacketAcknowledgementResponse.decode(new Reader(data))); - } - PacketAcknowledgements(request) { - const data = QueryPacketAcknowledgementsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketAcknowledgements", data); - return promise.then((data) => QueryPacketAcknowledgementsResponse.decode(new Reader(data))); - } - UnreceivedPackets(request) { - const data = QueryUnreceivedPacketsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "UnreceivedPackets", data); - return promise.then((data) => QueryUnreceivedPacketsResponse.decode(new Reader(data))); - } - UnreceivedAcks(request) { - const data = QueryUnreceivedAcksRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "UnreceivedAcks", data); - return promise.then((data) => QueryUnreceivedAcksResponse.decode(new Reader(data))); - } - NextSequenceReceive(request) { - const data = QueryNextSequenceReceiveRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "NextSequenceReceive", data); - return promise.then((data) => QueryNextSequenceReceiveResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts deleted file mode 100644 index 55495c8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts +++ /dev/null @@ -1,3475 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - Channel, - IdentifiedChannel, - PacketState, -} from "../../../../ibc/core/channel/v1/channel"; -import { - Height, - IdentifiedClientState, -} from "../../../../ibc/core/client/v1/client"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** QueryChannelRequest is the request type for the Query/Channel RPC method */ -export interface QueryChannelRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} - -/** - * QueryChannelResponse is the response type for the Query/Channel RPC method. - * Besides the Channel end, it includes a proof and the height from which the - * proof was retrieved. - */ -export interface QueryChannelResponse { - /** channel associated with the request identifiers */ - channel: Channel | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ -export interface QueryChannelsRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ -export interface QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryConnectionChannelsRequest is the request type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsRequest { - /** connection unique identifier */ - connection: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionChannelsResponse is the Response type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryChannelClientStateRequest is the request type for the Query/ClientState - * RPC method - */ -export interface QueryChannelClientStateRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} - -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelClientStateResponse { - /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryChannelConsensusStateRequest is the request type for the - * Query/ConsensusState RPC method - */ -export interface QueryChannelConsensusStateRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** revision number of the consensus state */ - revisionNumber: number; - /** revision height of the consensus state */ - revisionHeight: number; -} - -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelConsensusStateResponse { - /** consensus state associated with the channel */ - consensusState: Any | undefined; - /** client ID associated with the consensus state */ - clientId: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryPacketCommitmentRequest is the request type for the - * Query/PacketCommitment RPC method - */ -export interface QueryPacketCommitmentRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: number; -} - -/** - * QueryPacketCommitmentResponse defines the client query response for a packet - * which also includes a proof and the height from which the proof was - * retrieved - */ -export interface QueryPacketCommitmentResponse { - /** packet associated with the request fields */ - commitment: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryPacketCommitmentsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryPacketCommitmentsResponse is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsResponse { - commitments: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryPacketReceiptRequest is the request type for the - * Query/PacketReceipt RPC method - */ -export interface QueryPacketReceiptRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: number; -} - -/** - * QueryPacketReceiptResponse defines the client query response for a packet receipt - * which also includes a proof, and the height from which the proof was - * retrieved - */ -export interface QueryPacketReceiptResponse { - /** success flag for if receipt exists */ - received: boolean; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryPacketAcknowledgementRequest is the request type for the - * Query/PacketAcknowledgement RPC method - */ -export interface QueryPacketAcknowledgementRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: number; -} - -/** - * QueryPacketAcknowledgementResponse defines the client query response for a - * packet which also includes a proof and the height from which the - * proof was retrieved - */ -export interface QueryPacketAcknowledgementResponse { - /** packet associated with the request fields */ - acknowledgement: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryPacketAcknowledgementsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketAcknowledgementsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryPacketAcknowledgemetsResponse is the request type for the - * Query/QueryPacketAcknowledgements RPC method - */ -export interface QueryPacketAcknowledgementsResponse { - acknowledgements: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryUnreceivedPacketsRequest is the request type for the - * Query/UnreceivedPackets RPC method - */ -export interface QueryUnreceivedPacketsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** list of packet sequences */ - packetCommitmentSequences: number[]; -} - -/** - * QueryUnreceivedPacketsResponse is the response type for the - * Query/UnreceivedPacketCommitments RPC method - */ -export interface QueryUnreceivedPacketsResponse { - /** list of unreceived packet sequences */ - sequences: number[]; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryUnreceivedAcks is the request type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** list of acknowledgement sequences */ - packetAckSequences: number[]; -} - -/** - * QueryUnreceivedAcksResponse is the response type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksResponse { - /** list of unreceived acknowledgement sequences */ - sequences: number[]; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryNextSequenceReceiveRequest is the request type for the - * Query/QueryNextSequenceReceiveRequest RPC method - */ -export interface QueryNextSequenceReceiveRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} - -/** - * QuerySequenceResponse is the request type for the - * Query/QueryNextSequenceReceiveResponse RPC method - */ -export interface QueryNextSequenceReceiveResponse { - /** next sequence receive number */ - nextSequenceReceive: number; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -const baseQueryChannelRequest: object = { portId: "", channelId: "" }; - -export const QueryChannelRequest = { - encode( - message: QueryChannelRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelRequest } as QueryChannelRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelRequest { - const message = { ...baseQueryChannelRequest } as QueryChannelRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - return message; - }, - - toJSON(message: QueryChannelRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - - fromPartial(object: DeepPartial): QueryChannelRequest { - const message = { ...baseQueryChannelRequest } as QueryChannelRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - return message; - }, -}; - -const baseQueryChannelResponse: object = {}; - -export const QueryChannelResponse = { - encode( - message: QueryChannelResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelResponse } as QueryChannelResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelResponse { - const message = { ...baseQueryChannelResponse } as QueryChannelResponse; - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } else { - message.channel = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryChannelResponse): unknown { - const obj: any = {}; - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryChannelResponse { - const message = { ...baseQueryChannelResponse } as QueryChannelResponse; - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } else { - message.channel = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryChannelsRequest: object = {}; - -export const QueryChannelsRequest = { - encode( - message: QueryChannelsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelsRequest } as QueryChannelsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelsRequest { - const message = { ...baseQueryChannelsRequest } as QueryChannelsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryChannelsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryChannelsRequest { - const message = { ...baseQueryChannelsRequest } as QueryChannelsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryChannelsResponse: object = {}; - -export const QueryChannelsResponse = { - encode( - message: QueryChannelsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelsResponse } as QueryChannelsResponse; - message.channels = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push( - IdentifiedChannel.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelsResponse { - const message = { ...baseQueryChannelsResponse } as QueryChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryChannelsResponse): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => - e ? IdentifiedChannel.toJSON(e) : undefined - ); - } else { - obj.channels = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelsResponse { - const message = { ...baseQueryChannelsResponse } as QueryChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryConnectionChannelsRequest: object = { connection: "" }; - -export const QueryConnectionChannelsRequest = { - encode( - message: QueryConnectionChannelsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connection !== "") { - writer.uint32(10).string(message.connection); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionChannelsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionChannelsRequest, - } as QueryConnectionChannelsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionChannelsRequest { - const message = { - ...baseQueryConnectionChannelsRequest, - } as QueryConnectionChannelsRequest; - if (object.connection !== undefined && object.connection !== null) { - message.connection = String(object.connection); - } else { - message.connection = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionChannelsRequest): unknown { - const obj: any = {}; - message.connection !== undefined && (obj.connection = message.connection); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionChannelsRequest { - const message = { - ...baseQueryConnectionChannelsRequest, - } as QueryConnectionChannelsRequest; - if (object.connection !== undefined && object.connection !== null) { - message.connection = object.connection; - } else { - message.connection = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConnectionChannelsResponse: object = {}; - -export const QueryConnectionChannelsResponse = { - encode( - message: QueryConnectionChannelsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionChannelsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionChannelsResponse, - } as QueryConnectionChannelsResponse; - message.channels = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push( - IdentifiedChannel.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionChannelsResponse { - const message = { - ...baseQueryConnectionChannelsResponse, - } as QueryConnectionChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionChannelsResponse): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => - e ? IdentifiedChannel.toJSON(e) : undefined - ); - } else { - obj.channels = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionChannelsResponse { - const message = { - ...baseQueryConnectionChannelsResponse, - } as QueryConnectionChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryChannelClientStateRequest: object = { - portId: "", - channelId: "", -}; - -export const QueryChannelClientStateRequest = { - encode( - message: QueryChannelClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelClientStateRequest, - } as QueryChannelClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelClientStateRequest { - const message = { - ...baseQueryChannelClientStateRequest, - } as QueryChannelClientStateRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - return message; - }, - - toJSON(message: QueryChannelClientStateRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelClientStateRequest { - const message = { - ...baseQueryChannelClientStateRequest, - } as QueryChannelClientStateRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - return message; - }, -}; - -const baseQueryChannelClientStateResponse: object = {}; - -export const QueryChannelClientStateResponse = { - encode( - message: QueryChannelClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.identifiedClientState !== undefined) { - IdentifiedClientState.encode( - message.identifiedClientState, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelClientStateResponse, - } as QueryChannelClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifiedClientState = IdentifiedClientState.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelClientStateResponse { - const message = { - ...baseQueryChannelClientStateResponse, - } as QueryChannelClientStateResponse; - if ( - object.identifiedClientState !== undefined && - object.identifiedClientState !== null - ) { - message.identifiedClientState = IdentifiedClientState.fromJSON( - object.identifiedClientState - ); - } else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryChannelClientStateResponse): unknown { - const obj: any = {}; - message.identifiedClientState !== undefined && - (obj.identifiedClientState = message.identifiedClientState - ? IdentifiedClientState.toJSON(message.identifiedClientState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelClientStateResponse { - const message = { - ...baseQueryChannelClientStateResponse, - } as QueryChannelClientStateResponse; - if ( - object.identifiedClientState !== undefined && - object.identifiedClientState !== null - ) { - message.identifiedClientState = IdentifiedClientState.fromPartial( - object.identifiedClientState - ); - } else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryChannelConsensusStateRequest: object = { - portId: "", - channelId: "", - revisionNumber: 0, - revisionHeight: 0, -}; - -export const QueryChannelConsensusStateRequest = { - encode( - message: QueryChannelConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.revisionNumber !== 0) { - writer.uint32(24).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(32).uint64(message.revisionHeight); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelConsensusStateRequest, - } as QueryChannelConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 4: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelConsensusStateRequest { - const message = { - ...baseQueryChannelConsensusStateRequest, - } as QueryChannelConsensusStateRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: QueryChannelConsensusStateRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelConsensusStateRequest { - const message = { - ...baseQueryChannelConsensusStateRequest, - } as QueryChannelConsensusStateRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseQueryChannelConsensusStateResponse: object = { clientId: "" }; - -export const QueryChannelConsensusStateResponse = { - encode( - message: QueryChannelConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelConsensusStateResponse, - } as QueryChannelConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelConsensusStateResponse { - const message = { - ...baseQueryChannelConsensusStateResponse, - } as QueryChannelConsensusStateResponse; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryChannelConsensusStateResponse): unknown { - const obj: any = {}; - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelConsensusStateResponse { - const message = { - ...baseQueryChannelConsensusStateResponse, - } as QueryChannelConsensusStateResponse; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryPacketCommitmentRequest: object = { - portId: "", - channelId: "", - sequence: 0, -}; - -export const QueryPacketCommitmentRequest = { - encode( - message: QueryPacketCommitmentRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentRequest, - } as QueryPacketCommitmentRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentRequest { - const message = { - ...baseQueryPacketCommitmentRequest, - } as QueryPacketCommitmentRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentRequest { - const message = { - ...baseQueryPacketCommitmentRequest, - } as QueryPacketCommitmentRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseQueryPacketCommitmentResponse: object = {}; - -export const QueryPacketCommitmentResponse = { - encode( - message: QueryPacketCommitmentResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.commitment.length !== 0) { - writer.uint32(10).bytes(message.commitment); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentResponse, - } as QueryPacketCommitmentResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitment = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentResponse { - const message = { - ...baseQueryPacketCommitmentResponse, - } as QueryPacketCommitmentResponse; - if (object.commitment !== undefined && object.commitment !== null) { - message.commitment = bytesFromBase64(object.commitment); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentResponse): unknown { - const obj: any = {}; - message.commitment !== undefined && - (obj.commitment = base64FromBytes( - message.commitment !== undefined ? message.commitment : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentResponse { - const message = { - ...baseQueryPacketCommitmentResponse, - } as QueryPacketCommitmentResponse; - if (object.commitment !== undefined && object.commitment !== null) { - message.commitment = object.commitment; - } else { - message.commitment = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryPacketCommitmentsRequest: object = { portId: "", channelId: "" }; - -export const QueryPacketCommitmentsRequest = { - encode( - message: QueryPacketCommitmentsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentsRequest, - } as QueryPacketCommitmentsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentsRequest { - const message = { - ...baseQueryPacketCommitmentsRequest, - } as QueryPacketCommitmentsRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentsRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentsRequest { - const message = { - ...baseQueryPacketCommitmentsRequest, - } as QueryPacketCommitmentsRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryPacketCommitmentsResponse: object = {}; - -export const QueryPacketCommitmentsResponse = { - encode( - message: QueryPacketCommitmentsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.commitments) { - PacketState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentsResponse, - } as QueryPacketCommitmentsResponse; - message.commitments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentsResponse { - const message = { - ...baseQueryPacketCommitmentsResponse, - } as QueryPacketCommitmentsResponse; - message.commitments = []; - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentsResponse): unknown { - const obj: any = {}; - if (message.commitments) { - obj.commitments = message.commitments.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.commitments = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentsResponse { - const message = { - ...baseQueryPacketCommitmentsResponse, - } as QueryPacketCommitmentsResponse; - message.commitments = []; - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryPacketReceiptRequest: object = { - portId: "", - channelId: "", - sequence: 0, -}; - -export const QueryPacketReceiptRequest = { - encode( - message: QueryPacketReceiptRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketReceiptRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketReceiptRequest, - } as QueryPacketReceiptRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketReceiptRequest { - const message = { - ...baseQueryPacketReceiptRequest, - } as QueryPacketReceiptRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: QueryPacketReceiptRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketReceiptRequest { - const message = { - ...baseQueryPacketReceiptRequest, - } as QueryPacketReceiptRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseQueryPacketReceiptResponse: object = { received: false }; - -export const QueryPacketReceiptResponse = { - encode( - message: QueryPacketReceiptResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.received === true) { - writer.uint32(16).bool(message.received); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketReceiptResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketReceiptResponse, - } as QueryPacketReceiptResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.received = reader.bool(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketReceiptResponse { - const message = { - ...baseQueryPacketReceiptResponse, - } as QueryPacketReceiptResponse; - if (object.received !== undefined && object.received !== null) { - message.received = Boolean(object.received); - } else { - message.received = false; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryPacketReceiptResponse): unknown { - const obj: any = {}; - message.received !== undefined && (obj.received = message.received); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketReceiptResponse { - const message = { - ...baseQueryPacketReceiptResponse, - } as QueryPacketReceiptResponse; - if (object.received !== undefined && object.received !== null) { - message.received = object.received; - } else { - message.received = false; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementRequest: object = { - portId: "", - channelId: "", - sequence: 0, -}; - -export const QueryPacketAcknowledgementRequest = { - encode( - message: QueryPacketAcknowledgementRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementRequest, - } as QueryPacketAcknowledgementRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementRequest { - const message = { - ...baseQueryPacketAcknowledgementRequest, - } as QueryPacketAcknowledgementRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementRequest { - const message = { - ...baseQueryPacketAcknowledgementRequest, - } as QueryPacketAcknowledgementRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementResponse: object = {}; - -export const QueryPacketAcknowledgementResponse = { - encode( - message: QueryPacketAcknowledgementResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.acknowledgement.length !== 0) { - writer.uint32(10).bytes(message.acknowledgement); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementResponse, - } as QueryPacketAcknowledgementResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgement = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementResponse { - const message = { - ...baseQueryPacketAcknowledgementResponse, - } as QueryPacketAcknowledgementResponse; - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = bytesFromBase64(object.acknowledgement); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementResponse): unknown { - const obj: any = {}; - message.acknowledgement !== undefined && - (obj.acknowledgement = base64FromBytes( - message.acknowledgement !== undefined - ? message.acknowledgement - : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementResponse { - const message = { - ...baseQueryPacketAcknowledgementResponse, - } as QueryPacketAcknowledgementResponse; - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = object.acknowledgement; - } else { - message.acknowledgement = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementsRequest: object = { - portId: "", - channelId: "", -}; - -export const QueryPacketAcknowledgementsRequest = { - encode( - message: QueryPacketAcknowledgementsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementsRequest, - } as QueryPacketAcknowledgementsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementsRequest { - const message = { - ...baseQueryPacketAcknowledgementsRequest, - } as QueryPacketAcknowledgementsRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementsRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementsRequest { - const message = { - ...baseQueryPacketAcknowledgementsRequest, - } as QueryPacketAcknowledgementsRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementsResponse: object = {}; - -export const QueryPacketAcknowledgementsResponse = { - encode( - message: QueryPacketAcknowledgementsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.acknowledgements) { - PacketState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementsResponse, - } as QueryPacketAcknowledgementsResponse; - message.acknowledgements = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgements.push( - PacketState.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementsResponse { - const message = { - ...baseQueryPacketAcknowledgementsResponse, - } as QueryPacketAcknowledgementsResponse; - message.acknowledgements = []; - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementsResponse): unknown { - const obj: any = {}; - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.acknowledgements = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementsResponse { - const message = { - ...baseQueryPacketAcknowledgementsResponse, - } as QueryPacketAcknowledgementsResponse; - message.acknowledgements = []; - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryUnreceivedPacketsRequest: object = { - portId: "", - channelId: "", - packetCommitmentSequences: 0, -}; - -export const QueryUnreceivedPacketsRequest = { - encode( - message: QueryUnreceivedPacketsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - writer.uint32(26).fork(); - for (const v of message.packetCommitmentSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedPacketsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedPacketsRequest, - } as QueryUnreceivedPacketsRequest; - message.packetCommitmentSequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetCommitmentSequences.push( - longToNumber(reader.uint64() as Long) - ); - } - } else { - message.packetCommitmentSequences.push( - longToNumber(reader.uint64() as Long) - ); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedPacketsRequest { - const message = { - ...baseQueryUnreceivedPacketsRequest, - } as QueryUnreceivedPacketsRequest; - message.packetCommitmentSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if ( - object.packetCommitmentSequences !== undefined && - object.packetCommitmentSequences !== null - ) { - for (const e of object.packetCommitmentSequences) { - message.packetCommitmentSequences.push(Number(e)); - } - } - return message; - }, - - toJSON(message: QueryUnreceivedPacketsRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - if (message.packetCommitmentSequences) { - obj.packetCommitmentSequences = message.packetCommitmentSequences.map( - (e) => e - ); - } else { - obj.packetCommitmentSequences = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedPacketsRequest { - const message = { - ...baseQueryUnreceivedPacketsRequest, - } as QueryUnreceivedPacketsRequest; - message.packetCommitmentSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if ( - object.packetCommitmentSequences !== undefined && - object.packetCommitmentSequences !== null - ) { - for (const e of object.packetCommitmentSequences) { - message.packetCommitmentSequences.push(e); - } - } - return message; - }, -}; - -const baseQueryUnreceivedPacketsResponse: object = { sequences: 0 }; - -export const QueryUnreceivedPacketsResponse = { - encode( - message: QueryUnreceivedPacketsResponse, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedPacketsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedPacketsResponse, - } as QueryUnreceivedPacketsResponse; - message.sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedPacketsResponse { - const message = { - ...baseQueryUnreceivedPacketsResponse, - } as QueryUnreceivedPacketsResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Number(e)); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryUnreceivedPacketsResponse): unknown { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e); - } else { - obj.sequences = []; - } - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedPacketsResponse { - const message = { - ...baseQueryUnreceivedPacketsResponse, - } as QueryUnreceivedPacketsResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(e); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryUnreceivedAcksRequest: object = { - portId: "", - channelId: "", - packetAckSequences: 0, -}; - -export const QueryUnreceivedAcksRequest = { - encode( - message: QueryUnreceivedAcksRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - writer.uint32(26).fork(); - for (const v of message.packetAckSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedAcksRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedAcksRequest, - } as QueryUnreceivedAcksRequest; - message.packetAckSequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetAckSequences.push( - longToNumber(reader.uint64() as Long) - ); - } - } else { - message.packetAckSequences.push( - longToNumber(reader.uint64() as Long) - ); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedAcksRequest { - const message = { - ...baseQueryUnreceivedAcksRequest, - } as QueryUnreceivedAcksRequest; - message.packetAckSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if ( - object.packetAckSequences !== undefined && - object.packetAckSequences !== null - ) { - for (const e of object.packetAckSequences) { - message.packetAckSequences.push(Number(e)); - } - } - return message; - }, - - toJSON(message: QueryUnreceivedAcksRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - if (message.packetAckSequences) { - obj.packetAckSequences = message.packetAckSequences.map((e) => e); - } else { - obj.packetAckSequences = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedAcksRequest { - const message = { - ...baseQueryUnreceivedAcksRequest, - } as QueryUnreceivedAcksRequest; - message.packetAckSequences = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if ( - object.packetAckSequences !== undefined && - object.packetAckSequences !== null - ) { - for (const e of object.packetAckSequences) { - message.packetAckSequences.push(e); - } - } - return message; - }, -}; - -const baseQueryUnreceivedAcksResponse: object = { sequences: 0 }; - -export const QueryUnreceivedAcksResponse = { - encode( - message: QueryUnreceivedAcksResponse, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedAcksResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedAcksResponse, - } as QueryUnreceivedAcksResponse; - message.sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedAcksResponse { - const message = { - ...baseQueryUnreceivedAcksResponse, - } as QueryUnreceivedAcksResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Number(e)); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryUnreceivedAcksResponse): unknown { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e); - } else { - obj.sequences = []; - } - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedAcksResponse { - const message = { - ...baseQueryUnreceivedAcksResponse, - } as QueryUnreceivedAcksResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(e); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryNextSequenceReceiveRequest: object = { - portId: "", - channelId: "", -}; - -export const QueryNextSequenceReceiveRequest = { - encode( - message: QueryNextSequenceReceiveRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryNextSequenceReceiveRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryNextSequenceReceiveRequest, - } as QueryNextSequenceReceiveRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryNextSequenceReceiveRequest { - const message = { - ...baseQueryNextSequenceReceiveRequest, - } as QueryNextSequenceReceiveRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - return message; - }, - - toJSON(message: QueryNextSequenceReceiveRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryNextSequenceReceiveRequest { - const message = { - ...baseQueryNextSequenceReceiveRequest, - } as QueryNextSequenceReceiveRequest; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - return message; - }, -}; - -const baseQueryNextSequenceReceiveResponse: object = { nextSequenceReceive: 0 }; - -export const QueryNextSequenceReceiveResponse = { - encode( - message: QueryNextSequenceReceiveResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.nextSequenceReceive !== 0) { - writer.uint32(8).uint64(message.nextSequenceReceive); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryNextSequenceReceiveResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryNextSequenceReceiveResponse, - } as QueryNextSequenceReceiveResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextSequenceReceive = longToNumber(reader.uint64() as Long); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryNextSequenceReceiveResponse { - const message = { - ...baseQueryNextSequenceReceiveResponse, - } as QueryNextSequenceReceiveResponse; - if ( - object.nextSequenceReceive !== undefined && - object.nextSequenceReceive !== null - ) { - message.nextSequenceReceive = Number(object.nextSequenceReceive); - } else { - message.nextSequenceReceive = 0; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryNextSequenceReceiveResponse): unknown { - const obj: any = {}; - message.nextSequenceReceive !== undefined && - (obj.nextSequenceReceive = message.nextSequenceReceive); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryNextSequenceReceiveResponse { - const message = { - ...baseQueryNextSequenceReceiveResponse, - } as QueryNextSequenceReceiveResponse; - if ( - object.nextSequenceReceive !== undefined && - object.nextSequenceReceive !== null - ) { - message.nextSequenceReceive = object.nextSequenceReceive; - } else { - message.nextSequenceReceive = 0; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Channel queries an IBC Channel. */ - Channel(request: QueryChannelRequest): Promise; - /** Channels queries all the IBC channels of a chain. */ - Channels(request: QueryChannelsRequest): Promise; - /** - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - ConnectionChannels( - request: QueryConnectionChannelsRequest - ): Promise; - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - ChannelClientState( - request: QueryChannelClientStateRequest - ): Promise; - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - ChannelConsensusState( - request: QueryChannelConsensusStateRequest - ): Promise; - /** PacketCommitment queries a stored packet commitment hash. */ - PacketCommitment( - request: QueryPacketCommitmentRequest - ): Promise; - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - PacketCommitments( - request: QueryPacketCommitmentsRequest - ): Promise; - /** PacketReceipt queries if a given packet sequence has been received on the queried chain */ - PacketReceipt( - request: QueryPacketReceiptRequest - ): Promise; - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */ - PacketAcknowledgement( - request: QueryPacketAcknowledgementRequest - ): Promise; - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - PacketAcknowledgements( - request: QueryPacketAcknowledgementsRequest - ): Promise; - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - UnreceivedPackets( - request: QueryUnreceivedPacketsRequest - ): Promise; - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a - * channel and sequences. - */ - UnreceivedAcks( - request: QueryUnreceivedAcksRequest - ): Promise; - /** NextSequenceReceive returns the next receive sequence for a given channel. */ - NextSequenceReceive( - request: QueryNextSequenceReceiveRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Channel(request: QueryChannelRequest): Promise { - const data = QueryChannelRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "Channel", - data - ); - return promise.then((data) => - QueryChannelResponse.decode(new Reader(data)) - ); - } - - Channels(request: QueryChannelsRequest): Promise { - const data = QueryChannelsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "Channels", - data - ); - return promise.then((data) => - QueryChannelsResponse.decode(new Reader(data)) - ); - } - - ConnectionChannels( - request: QueryConnectionChannelsRequest - ): Promise { - const data = QueryConnectionChannelsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "ConnectionChannels", - data - ); - return promise.then((data) => - QueryConnectionChannelsResponse.decode(new Reader(data)) - ); - } - - ChannelClientState( - request: QueryChannelClientStateRequest - ): Promise { - const data = QueryChannelClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "ChannelClientState", - data - ); - return promise.then((data) => - QueryChannelClientStateResponse.decode(new Reader(data)) - ); - } - - ChannelConsensusState( - request: QueryChannelConsensusStateRequest - ): Promise { - const data = QueryChannelConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "ChannelConsensusState", - data - ); - return promise.then((data) => - QueryChannelConsensusStateResponse.decode(new Reader(data)) - ); - } - - PacketCommitment( - request: QueryPacketCommitmentRequest - ): Promise { - const data = QueryPacketCommitmentRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketCommitment", - data - ); - return promise.then((data) => - QueryPacketCommitmentResponse.decode(new Reader(data)) - ); - } - - PacketCommitments( - request: QueryPacketCommitmentsRequest - ): Promise { - const data = QueryPacketCommitmentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketCommitments", - data - ); - return promise.then((data) => - QueryPacketCommitmentsResponse.decode(new Reader(data)) - ); - } - - PacketReceipt( - request: QueryPacketReceiptRequest - ): Promise { - const data = QueryPacketReceiptRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketReceipt", - data - ); - return promise.then((data) => - QueryPacketReceiptResponse.decode(new Reader(data)) - ); - } - - PacketAcknowledgement( - request: QueryPacketAcknowledgementRequest - ): Promise { - const data = QueryPacketAcknowledgementRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketAcknowledgement", - data - ); - return promise.then((data) => - QueryPacketAcknowledgementResponse.decode(new Reader(data)) - ); - } - - PacketAcknowledgements( - request: QueryPacketAcknowledgementsRequest - ): Promise { - const data = QueryPacketAcknowledgementsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketAcknowledgements", - data - ); - return promise.then((data) => - QueryPacketAcknowledgementsResponse.decode(new Reader(data)) - ); - } - - UnreceivedPackets( - request: QueryUnreceivedPacketsRequest - ): Promise { - const data = QueryUnreceivedPacketsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "UnreceivedPackets", - data - ); - return promise.then((data) => - QueryUnreceivedPacketsResponse.decode(new Reader(data)) - ); - } - - UnreceivedAcks( - request: QueryUnreceivedAcksRequest - ): Promise { - const data = QueryUnreceivedAcksRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "UnreceivedAcks", - data - ); - return promise.then((data) => - QueryUnreceivedAcksResponse.decode(new Reader(data)) - ); - } - - NextSequenceReceive( - request: QueryNextSequenceReceiveRequest - ): Promise { - const data = QueryNextSequenceReceiveRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "NextSequenceReceive", - data - ); - return promise.then((data) => - QueryNextSequenceReceiveResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.d.ts deleted file mode 100644 index ff9888b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.d.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Channel, Packet } from "../../../../ibc/core/channel/v1/channel"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export declare const protobufPackage = "ibc.core.channel.v1"; -/** - * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It - * is called by a relayer on Chain A. - */ -export interface MsgChannelOpenInit { - portId: string; - channel: Channel | undefined; - signer: string; -} -/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponse { -} -/** - * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - * on Chain B. - */ -export interface MsgChannelOpenTry { - portId: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need the channel identifier - * of the previous channel in state INIT - */ - previousChannelId: string; - channel: Channel | undefined; - counterpartyVersion: string; - proofInit: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponse { -} -/** - * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge - * the change of channel state to TRYOPEN on Chain B. - */ -export interface MsgChannelOpenAck { - portId: string; - channelId: string; - counterpartyChannelId: string; - counterpartyVersion: string; - proofTry: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponse { -} -/** - * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of channel state to OPEN on Chain A. - */ -export interface MsgChannelOpenConfirm { - portId: string; - channelId: string; - proofAck: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. */ -export interface MsgChannelOpenConfirmResponse { -} -/** - * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A - * to close a channel with Chain B. - */ -export interface MsgChannelCloseInit { - portId: string; - channelId: string; - signer: string; -} -/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ -export interface MsgChannelCloseInitResponse { -} -/** - * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B - * to acknowledge the change of channel state to CLOSED on Chain A. - */ -export interface MsgChannelCloseConfirm { - portId: string; - channelId: string; - proofInit: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. */ -export interface MsgChannelCloseConfirmResponse { -} -/** MsgRecvPacket receives incoming IBC packet */ -export interface MsgRecvPacket { - packet: Packet | undefined; - proofCommitment: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponse { -} -/** MsgTimeout receives timed-out packet */ -export interface MsgTimeout { - packet: Packet | undefined; - proofUnreceived: Uint8Array; - proofHeight: Height | undefined; - nextSequenceRecv: number; - signer: string; -} -/** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponse { -} -/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ -export interface MsgTimeoutOnClose { - packet: Packet | undefined; - proofUnreceived: Uint8Array; - proofClose: Uint8Array; - proofHeight: Height | undefined; - nextSequenceRecv: number; - signer: string; -} -/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponse { -} -/** MsgAcknowledgement receives incoming IBC acknowledgement */ -export interface MsgAcknowledgement { - packet: Packet | undefined; - acknowledgement: Uint8Array; - proofAcked: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -export interface MsgAcknowledgementResponse { -} -export declare const MsgChannelOpenInit: { - encode(message: MsgChannelOpenInit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenInit; - fromJSON(object: any): MsgChannelOpenInit; - toJSON(message: MsgChannelOpenInit): unknown; - fromPartial(object: DeepPartial): MsgChannelOpenInit; -}; -export declare const MsgChannelOpenInitResponse: { - encode(_: MsgChannelOpenInitResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenInitResponse; - fromJSON(_: any): MsgChannelOpenInitResponse; - toJSON(_: MsgChannelOpenInitResponse): unknown; - fromPartial(_: DeepPartial): MsgChannelOpenInitResponse; -}; -export declare const MsgChannelOpenTry: { - encode(message: MsgChannelOpenTry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenTry; - fromJSON(object: any): MsgChannelOpenTry; - toJSON(message: MsgChannelOpenTry): unknown; - fromPartial(object: DeepPartial): MsgChannelOpenTry; -}; -export declare const MsgChannelOpenTryResponse: { - encode(_: MsgChannelOpenTryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenTryResponse; - fromJSON(_: any): MsgChannelOpenTryResponse; - toJSON(_: MsgChannelOpenTryResponse): unknown; - fromPartial(_: DeepPartial): MsgChannelOpenTryResponse; -}; -export declare const MsgChannelOpenAck: { - encode(message: MsgChannelOpenAck, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenAck; - fromJSON(object: any): MsgChannelOpenAck; - toJSON(message: MsgChannelOpenAck): unknown; - fromPartial(object: DeepPartial): MsgChannelOpenAck; -}; -export declare const MsgChannelOpenAckResponse: { - encode(_: MsgChannelOpenAckResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenAckResponse; - fromJSON(_: any): MsgChannelOpenAckResponse; - toJSON(_: MsgChannelOpenAckResponse): unknown; - fromPartial(_: DeepPartial): MsgChannelOpenAckResponse; -}; -export declare const MsgChannelOpenConfirm: { - encode(message: MsgChannelOpenConfirm, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenConfirm; - fromJSON(object: any): MsgChannelOpenConfirm; - toJSON(message: MsgChannelOpenConfirm): unknown; - fromPartial(object: DeepPartial): MsgChannelOpenConfirm; -}; -export declare const MsgChannelOpenConfirmResponse: { - encode(_: MsgChannelOpenConfirmResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenConfirmResponse; - fromJSON(_: any): MsgChannelOpenConfirmResponse; - toJSON(_: MsgChannelOpenConfirmResponse): unknown; - fromPartial(_: DeepPartial): MsgChannelOpenConfirmResponse; -}; -export declare const MsgChannelCloseInit: { - encode(message: MsgChannelCloseInit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseInit; - fromJSON(object: any): MsgChannelCloseInit; - toJSON(message: MsgChannelCloseInit): unknown; - fromPartial(object: DeepPartial): MsgChannelCloseInit; -}; -export declare const MsgChannelCloseInitResponse: { - encode(_: MsgChannelCloseInitResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseInitResponse; - fromJSON(_: any): MsgChannelCloseInitResponse; - toJSON(_: MsgChannelCloseInitResponse): unknown; - fromPartial(_: DeepPartial): MsgChannelCloseInitResponse; -}; -export declare const MsgChannelCloseConfirm: { - encode(message: MsgChannelCloseConfirm, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseConfirm; - fromJSON(object: any): MsgChannelCloseConfirm; - toJSON(message: MsgChannelCloseConfirm): unknown; - fromPartial(object: DeepPartial): MsgChannelCloseConfirm; -}; -export declare const MsgChannelCloseConfirmResponse: { - encode(_: MsgChannelCloseConfirmResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseConfirmResponse; - fromJSON(_: any): MsgChannelCloseConfirmResponse; - toJSON(_: MsgChannelCloseConfirmResponse): unknown; - fromPartial(_: DeepPartial): MsgChannelCloseConfirmResponse; -}; -export declare const MsgRecvPacket: { - encode(message: MsgRecvPacket, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRecvPacket; - fromJSON(object: any): MsgRecvPacket; - toJSON(message: MsgRecvPacket): unknown; - fromPartial(object: DeepPartial): MsgRecvPacket; -}; -export declare const MsgRecvPacketResponse: { - encode(_: MsgRecvPacketResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRecvPacketResponse; - fromJSON(_: any): MsgRecvPacketResponse; - toJSON(_: MsgRecvPacketResponse): unknown; - fromPartial(_: DeepPartial): MsgRecvPacketResponse; -}; -export declare const MsgTimeout: { - encode(message: MsgTimeout, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTimeout; - fromJSON(object: any): MsgTimeout; - toJSON(message: MsgTimeout): unknown; - fromPartial(object: DeepPartial): MsgTimeout; -}; -export declare const MsgTimeoutResponse: { - encode(_: MsgTimeoutResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutResponse; - fromJSON(_: any): MsgTimeoutResponse; - toJSON(_: MsgTimeoutResponse): unknown; - fromPartial(_: DeepPartial): MsgTimeoutResponse; -}; -export declare const MsgTimeoutOnClose: { - encode(message: MsgTimeoutOnClose, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutOnClose; - fromJSON(object: any): MsgTimeoutOnClose; - toJSON(message: MsgTimeoutOnClose): unknown; - fromPartial(object: DeepPartial): MsgTimeoutOnClose; -}; -export declare const MsgTimeoutOnCloseResponse: { - encode(_: MsgTimeoutOnCloseResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutOnCloseResponse; - fromJSON(_: any): MsgTimeoutOnCloseResponse; - toJSON(_: MsgTimeoutOnCloseResponse): unknown; - fromPartial(_: DeepPartial): MsgTimeoutOnCloseResponse; -}; -export declare const MsgAcknowledgement: { - encode(message: MsgAcknowledgement, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAcknowledgement; - fromJSON(object: any): MsgAcknowledgement; - toJSON(message: MsgAcknowledgement): unknown; - fromPartial(object: DeepPartial): MsgAcknowledgement; -}; -export declare const MsgAcknowledgementResponse: { - encode(_: MsgAcknowledgementResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAcknowledgementResponse; - fromJSON(_: any): MsgAcknowledgementResponse; - toJSON(_: MsgAcknowledgementResponse): unknown; - fromPartial(_: DeepPartial): MsgAcknowledgementResponse; -}; -/** Msg defines the ibc/channel Msg service. */ -export interface Msg { - /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ - ChannelOpenInit(request: MsgChannelOpenInit): Promise; - /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ - ChannelOpenTry(request: MsgChannelOpenTry): Promise; - /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ - ChannelOpenAck(request: MsgChannelOpenAck): Promise; - /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ - ChannelOpenConfirm(request: MsgChannelOpenConfirm): Promise; - /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ - ChannelCloseInit(request: MsgChannelCloseInit): Promise; - /** ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. */ - ChannelCloseConfirm(request: MsgChannelCloseConfirm): Promise; - /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ - RecvPacket(request: MsgRecvPacket): Promise; - /** Timeout defines a rpc handler method for MsgTimeout. */ - Timeout(request: MsgTimeout): Promise; - /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ - TimeoutOnClose(request: MsgTimeoutOnClose): Promise; - /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ - Acknowledgement(request: MsgAcknowledgement): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - ChannelOpenInit(request: MsgChannelOpenInit): Promise; - ChannelOpenTry(request: MsgChannelOpenTry): Promise; - ChannelOpenAck(request: MsgChannelOpenAck): Promise; - ChannelOpenConfirm(request: MsgChannelOpenConfirm): Promise; - ChannelCloseInit(request: MsgChannelCloseInit): Promise; - ChannelCloseConfirm(request: MsgChannelCloseConfirm): Promise; - RecvPacket(request: MsgRecvPacket): Promise; - Timeout(request: MsgTimeout): Promise; - TimeoutOnClose(request: MsgTimeoutOnClose): Promise; - Acknowledgement(request: MsgAcknowledgement): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.js deleted file mode 100644 index 3bec595..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.js +++ /dev/null @@ -1,1810 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Channel, Packet } from "../../../../ibc/core/channel/v1/channel"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export const protobufPackage = "ibc.core.channel.v1"; -const baseMsgChannelOpenInit = { portId: "", signer: "" }; -export const MsgChannelOpenInit = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenInit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChannelOpenInit }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } - else { - message.channel = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChannelOpenInit }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } - else { - message.channel = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgChannelOpenInitResponse = {}; -export const MsgChannelOpenInitResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenInitResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgChannelOpenInitResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgChannelOpenInitResponse, - }; - return message; - }, -}; -const baseMsgChannelOpenTry = { - portId: "", - previousChannelId: "", - counterpartyVersion: "", - signer: "", -}; -export const MsgChannelOpenTry = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.previousChannelId !== "") { - writer.uint32(18).string(message.previousChannelId); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(26).fork()).ldelim(); - } - if (message.counterpartyVersion !== "") { - writer.uint32(34).string(message.counterpartyVersion); - } - if (message.proofInit.length !== 0) { - writer.uint32(42).bytes(message.proofInit); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenTry }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.previousChannelId = reader.string(); - break; - case 3: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofInit = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChannelOpenTry }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.previousChannelId !== undefined && - object.previousChannelId !== null) { - message.previousChannelId = String(object.previousChannelId); - } - else { - message.previousChannelId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } - else { - message.channel = undefined; - } - if (object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null) { - message.counterpartyVersion = String(object.counterpartyVersion); - } - else { - message.counterpartyVersion = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = bytesFromBase64(object.proofInit); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.previousChannelId !== undefined && - (obj.previousChannelId = message.previousChannelId); - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.counterpartyVersion !== undefined && - (obj.counterpartyVersion = message.counterpartyVersion); - message.proofInit !== undefined && - (obj.proofInit = base64FromBytes(message.proofInit !== undefined ? message.proofInit : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChannelOpenTry }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.previousChannelId !== undefined && - object.previousChannelId !== null) { - message.previousChannelId = object.previousChannelId; - } - else { - message.previousChannelId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } - else { - message.channel = undefined; - } - if (object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null) { - message.counterpartyVersion = object.counterpartyVersion; - } - else { - message.counterpartyVersion = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = object.proofInit; - } - else { - message.proofInit = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgChannelOpenTryResponse = {}; -export const MsgChannelOpenTryResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenTryResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgChannelOpenTryResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgChannelOpenTryResponse, - }; - return message; - }, -}; -const baseMsgChannelOpenAck = { - portId: "", - channelId: "", - counterpartyChannelId: "", - counterpartyVersion: "", - signer: "", -}; -export const MsgChannelOpenAck = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.counterpartyChannelId !== "") { - writer.uint32(26).string(message.counterpartyChannelId); - } - if (message.counterpartyVersion !== "") { - writer.uint32(34).string(message.counterpartyVersion); - } - if (message.proofTry.length !== 0) { - writer.uint32(42).bytes(message.proofTry); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenAck }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannelId = reader.string(); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofTry = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChannelOpenAck }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.counterpartyChannelId !== undefined && - object.counterpartyChannelId !== null) { - message.counterpartyChannelId = String(object.counterpartyChannelId); - } - else { - message.counterpartyChannelId = ""; - } - if (object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null) { - message.counterpartyVersion = String(object.counterpartyVersion); - } - else { - message.counterpartyVersion = ""; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = bytesFromBase64(object.proofTry); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.counterpartyChannelId !== undefined && - (obj.counterpartyChannelId = message.counterpartyChannelId); - message.counterpartyVersion !== undefined && - (obj.counterpartyVersion = message.counterpartyVersion); - message.proofTry !== undefined && - (obj.proofTry = base64FromBytes(message.proofTry !== undefined ? message.proofTry : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChannelOpenAck }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.counterpartyChannelId !== undefined && - object.counterpartyChannelId !== null) { - message.counterpartyChannelId = object.counterpartyChannelId; - } - else { - message.counterpartyChannelId = ""; - } - if (object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null) { - message.counterpartyVersion = object.counterpartyVersion; - } - else { - message.counterpartyVersion = ""; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = object.proofTry; - } - else { - message.proofTry = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgChannelOpenAckResponse = {}; -export const MsgChannelOpenAckResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenAckResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgChannelOpenAckResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgChannelOpenAckResponse, - }; - return message; - }, -}; -const baseMsgChannelOpenConfirm = { - portId: "", - channelId: "", - signer: "", -}; -export const MsgChannelOpenConfirm = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.proofAck.length !== 0) { - writer.uint32(26).bytes(message.proofAck); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenConfirm }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofAck = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChannelOpenConfirm }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = bytesFromBase64(object.proofAck); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.proofAck !== undefined && - (obj.proofAck = base64FromBytes(message.proofAck !== undefined ? message.proofAck : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChannelOpenConfirm }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = object.proofAck; - } - else { - message.proofAck = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgChannelOpenConfirmResponse = {}; -export const MsgChannelOpenConfirmResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenConfirmResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgChannelOpenConfirmResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgChannelOpenConfirmResponse, - }; - return message; - }, -}; -const baseMsgChannelCloseInit = { - portId: "", - channelId: "", - signer: "", -}; -export const MsgChannelCloseInit = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelCloseInit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChannelCloseInit }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChannelCloseInit }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgChannelCloseInitResponse = {}; -export const MsgChannelCloseInitResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelCloseInitResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgChannelCloseInitResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgChannelCloseInitResponse, - }; - return message; - }, -}; -const baseMsgChannelCloseConfirm = { - portId: "", - channelId: "", - signer: "", -}; -export const MsgChannelCloseConfirm = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.proofInit.length !== 0) { - writer.uint32(26).bytes(message.proofInit); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelCloseConfirm }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofInit = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChannelCloseConfirm }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } - else { - message.channelId = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = bytesFromBase64(object.proofInit); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.proofInit !== undefined && - (obj.proofInit = base64FromBytes(message.proofInit !== undefined ? message.proofInit : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChannelCloseConfirm }; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } - else { - message.channelId = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = object.proofInit; - } - else { - message.proofInit = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgChannelCloseConfirmResponse = {}; -export const MsgChannelCloseConfirmResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelCloseConfirmResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgChannelCloseConfirmResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgChannelCloseConfirmResponse, - }; - return message; - }, -}; -const baseMsgRecvPacket = { signer: "" }; -export const MsgRecvPacket = { - encode(message, writer = Writer.create()) { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofCommitment.length !== 0) { - writer.uint32(18).bytes(message.proofCommitment); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRecvPacket }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofCommitment = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgRecvPacket }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } - else { - message.packet = undefined; - } - if (object.proofCommitment !== undefined && - object.proofCommitment !== null) { - message.proofCommitment = bytesFromBase64(object.proofCommitment); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofCommitment !== undefined && - (obj.proofCommitment = base64FromBytes(message.proofCommitment !== undefined - ? message.proofCommitment - : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgRecvPacket }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } - else { - message.packet = undefined; - } - if (object.proofCommitment !== undefined && - object.proofCommitment !== null) { - message.proofCommitment = object.proofCommitment; - } - else { - message.proofCommitment = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgRecvPacketResponse = {}; -export const MsgRecvPacketResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRecvPacketResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgRecvPacketResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgRecvPacketResponse }; - return message; - }, -}; -const baseMsgTimeout = { nextSequenceRecv: 0, signer: "" }; -export const MsgTimeout = { - encode(message, writer = Writer.create()) { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofUnreceived.length !== 0) { - writer.uint32(18).bytes(message.proofUnreceived); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.nextSequenceRecv !== 0) { - writer.uint32(32).uint64(message.nextSequenceRecv); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeout }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.nextSequenceRecv = longToNumber(reader.uint64()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgTimeout }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } - else { - message.packet = undefined; - } - if (object.proofUnreceived !== undefined && - object.proofUnreceived !== null) { - message.proofUnreceived = bytesFromBase64(object.proofUnreceived); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null) { - message.nextSequenceRecv = Number(object.nextSequenceRecv); - } - else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofUnreceived !== undefined && - (obj.proofUnreceived = base64FromBytes(message.proofUnreceived !== undefined - ? message.proofUnreceived - : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.nextSequenceRecv !== undefined && - (obj.nextSequenceRecv = message.nextSequenceRecv); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgTimeout }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } - else { - message.packet = undefined; - } - if (object.proofUnreceived !== undefined && - object.proofUnreceived !== null) { - message.proofUnreceived = object.proofUnreceived; - } - else { - message.proofUnreceived = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null) { - message.nextSequenceRecv = object.nextSequenceRecv; - } - else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgTimeoutResponse = {}; -export const MsgTimeoutResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeoutResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgTimeoutResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgTimeoutResponse }; - return message; - }, -}; -const baseMsgTimeoutOnClose = { nextSequenceRecv: 0, signer: "" }; -export const MsgTimeoutOnClose = { - encode(message, writer = Writer.create()) { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofUnreceived.length !== 0) { - writer.uint32(18).bytes(message.proofUnreceived); - } - if (message.proofClose.length !== 0) { - writer.uint32(26).bytes(message.proofClose); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.nextSequenceRecv !== 0) { - writer.uint32(40).uint64(message.nextSequenceRecv); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeoutOnClose }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofClose = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.nextSequenceRecv = longToNumber(reader.uint64()); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgTimeoutOnClose }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } - else { - message.packet = undefined; - } - if (object.proofUnreceived !== undefined && - object.proofUnreceived !== null) { - message.proofUnreceived = bytesFromBase64(object.proofUnreceived); - } - if (object.proofClose !== undefined && object.proofClose !== null) { - message.proofClose = bytesFromBase64(object.proofClose); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null) { - message.nextSequenceRecv = Number(object.nextSequenceRecv); - } - else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofUnreceived !== undefined && - (obj.proofUnreceived = base64FromBytes(message.proofUnreceived !== undefined - ? message.proofUnreceived - : new Uint8Array())); - message.proofClose !== undefined && - (obj.proofClose = base64FromBytes(message.proofClose !== undefined ? message.proofClose : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.nextSequenceRecv !== undefined && - (obj.nextSequenceRecv = message.nextSequenceRecv); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgTimeoutOnClose }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } - else { - message.packet = undefined; - } - if (object.proofUnreceived !== undefined && - object.proofUnreceived !== null) { - message.proofUnreceived = object.proofUnreceived; - } - else { - message.proofUnreceived = new Uint8Array(); - } - if (object.proofClose !== undefined && object.proofClose !== null) { - message.proofClose = object.proofClose; - } - else { - message.proofClose = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null) { - message.nextSequenceRecv = object.nextSequenceRecv; - } - else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgTimeoutOnCloseResponse = {}; -export const MsgTimeoutOnCloseResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgTimeoutOnCloseResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgTimeoutOnCloseResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgTimeoutOnCloseResponse, - }; - return message; - }, -}; -const baseMsgAcknowledgement = { signer: "" }; -export const MsgAcknowledgement = { - encode(message, writer = Writer.create()) { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.acknowledgement.length !== 0) { - writer.uint32(18).bytes(message.acknowledgement); - } - if (message.proofAcked.length !== 0) { - writer.uint32(26).bytes(message.proofAcked); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgAcknowledgement }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proofAcked = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgAcknowledgement }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } - else { - message.packet = undefined; - } - if (object.acknowledgement !== undefined && - object.acknowledgement !== null) { - message.acknowledgement = bytesFromBase64(object.acknowledgement); - } - if (object.proofAcked !== undefined && object.proofAcked !== null) { - message.proofAcked = bytesFromBase64(object.proofAcked); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.acknowledgement !== undefined && - (obj.acknowledgement = base64FromBytes(message.acknowledgement !== undefined - ? message.acknowledgement - : new Uint8Array())); - message.proofAcked !== undefined && - (obj.proofAcked = base64FromBytes(message.proofAcked !== undefined ? message.proofAcked : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgAcknowledgement }; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } - else { - message.packet = undefined; - } - if (object.acknowledgement !== undefined && - object.acknowledgement !== null) { - message.acknowledgement = object.acknowledgement; - } - else { - message.acknowledgement = new Uint8Array(); - } - if (object.proofAcked !== undefined && object.proofAcked !== null) { - message.proofAcked = object.proofAcked; - } - else { - message.proofAcked = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgAcknowledgementResponse = {}; -export const MsgAcknowledgementResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAcknowledgementResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgAcknowledgementResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgAcknowledgementResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - ChannelOpenInit(request) { - const data = MsgChannelOpenInit.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenInit", data); - return promise.then((data) => MsgChannelOpenInitResponse.decode(new Reader(data))); - } - ChannelOpenTry(request) { - const data = MsgChannelOpenTry.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenTry", data); - return promise.then((data) => MsgChannelOpenTryResponse.decode(new Reader(data))); - } - ChannelOpenAck(request) { - const data = MsgChannelOpenAck.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenAck", data); - return promise.then((data) => MsgChannelOpenAckResponse.decode(new Reader(data))); - } - ChannelOpenConfirm(request) { - const data = MsgChannelOpenConfirm.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenConfirm", data); - return promise.then((data) => MsgChannelOpenConfirmResponse.decode(new Reader(data))); - } - ChannelCloseInit(request) { - const data = MsgChannelCloseInit.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelCloseInit", data); - return promise.then((data) => MsgChannelCloseInitResponse.decode(new Reader(data))); - } - ChannelCloseConfirm(request) { - const data = MsgChannelCloseConfirm.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelCloseConfirm", data); - return promise.then((data) => MsgChannelCloseConfirmResponse.decode(new Reader(data))); - } - RecvPacket(request) { - const data = MsgRecvPacket.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "RecvPacket", data); - return promise.then((data) => MsgRecvPacketResponse.decode(new Reader(data))); - } - Timeout(request) { - const data = MsgTimeout.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "Timeout", data); - return promise.then((data) => MsgTimeoutResponse.decode(new Reader(data))); - } - TimeoutOnClose(request) { - const data = MsgTimeoutOnClose.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "TimeoutOnClose", data); - return promise.then((data) => MsgTimeoutOnCloseResponse.decode(new Reader(data))); - } - Acknowledgement(request) { - const data = MsgAcknowledgement.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "Acknowledgement", data); - return promise.then((data) => MsgAcknowledgementResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts deleted file mode 100644 index 228c1a1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts +++ /dev/null @@ -1,2275 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Channel, Packet } from "../../../../ibc/core/channel/v1/channel"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** - * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It - * is called by a relayer on Chain A. - */ -export interface MsgChannelOpenInit { - portId: string; - channel: Channel | undefined; - signer: string; -} - -/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponse {} - -/** - * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - * on Chain B. - */ -export interface MsgChannelOpenTry { - portId: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need the channel identifier - * of the previous channel in state INIT - */ - previousChannelId: string; - channel: Channel | undefined; - counterpartyVersion: string; - proofInit: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponse {} - -/** - * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge - * the change of channel state to TRYOPEN on Chain B. - */ -export interface MsgChannelOpenAck { - portId: string; - channelId: string; - counterpartyChannelId: string; - counterpartyVersion: string; - proofTry: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponse {} - -/** - * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of channel state to OPEN on Chain A. - */ -export interface MsgChannelOpenConfirm { - portId: string; - channelId: string; - proofAck: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. */ -export interface MsgChannelOpenConfirmResponse {} - -/** - * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A - * to close a channel with Chain B. - */ -export interface MsgChannelCloseInit { - portId: string; - channelId: string; - signer: string; -} - -/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ -export interface MsgChannelCloseInitResponse {} - -/** - * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B - * to acknowledge the change of channel state to CLOSED on Chain A. - */ -export interface MsgChannelCloseConfirm { - portId: string; - channelId: string; - proofInit: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. */ -export interface MsgChannelCloseConfirmResponse {} - -/** MsgRecvPacket receives incoming IBC packet */ -export interface MsgRecvPacket { - packet: Packet | undefined; - proofCommitment: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponse {} - -/** MsgTimeout receives timed-out packet */ -export interface MsgTimeout { - packet: Packet | undefined; - proofUnreceived: Uint8Array; - proofHeight: Height | undefined; - nextSequenceRecv: number; - signer: string; -} - -/** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponse {} - -/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ -export interface MsgTimeoutOnClose { - packet: Packet | undefined; - proofUnreceived: Uint8Array; - proofClose: Uint8Array; - proofHeight: Height | undefined; - nextSequenceRecv: number; - signer: string; -} - -/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponse {} - -/** MsgAcknowledgement receives incoming IBC acknowledgement */ -export interface MsgAcknowledgement { - packet: Packet | undefined; - acknowledgement: Uint8Array; - proofAcked: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -export interface MsgAcknowledgementResponse {} - -const baseMsgChannelOpenInit: object = { portId: "", signer: "" }; - -export const MsgChannelOpenInit = { - encode( - message: MsgChannelOpenInit, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenInit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenInit } as MsgChannelOpenInit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenInit { - const message = { ...baseMsgChannelOpenInit } as MsgChannelOpenInit; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } else { - message.channel = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenInit): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelOpenInit { - const message = { ...baseMsgChannelOpenInit } as MsgChannelOpenInit; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } else { - message.channel = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenInitResponse: object = {}; - -export const MsgChannelOpenInitResponse = { - encode( - _: MsgChannelOpenInitResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenInitResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenInitResponse, - } as MsgChannelOpenInitResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenInitResponse { - const message = { - ...baseMsgChannelOpenInitResponse, - } as MsgChannelOpenInitResponse; - return message; - }, - - toJSON(_: MsgChannelOpenInitResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenInitResponse { - const message = { - ...baseMsgChannelOpenInitResponse, - } as MsgChannelOpenInitResponse; - return message; - }, -}; - -const baseMsgChannelOpenTry: object = { - portId: "", - previousChannelId: "", - counterpartyVersion: "", - signer: "", -}; - -export const MsgChannelOpenTry = { - encode(message: MsgChannelOpenTry, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.previousChannelId !== "") { - writer.uint32(18).string(message.previousChannelId); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(26).fork()).ldelim(); - } - if (message.counterpartyVersion !== "") { - writer.uint32(34).string(message.counterpartyVersion); - } - if (message.proofInit.length !== 0) { - writer.uint32(42).bytes(message.proofInit); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenTry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenTry } as MsgChannelOpenTry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.previousChannelId = reader.string(); - break; - case 3: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofInit = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenTry { - const message = { ...baseMsgChannelOpenTry } as MsgChannelOpenTry; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if ( - object.previousChannelId !== undefined && - object.previousChannelId !== null - ) { - message.previousChannelId = String(object.previousChannelId); - } else { - message.previousChannelId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } else { - message.channel = undefined; - } - if ( - object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null - ) { - message.counterpartyVersion = String(object.counterpartyVersion); - } else { - message.counterpartyVersion = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = bytesFromBase64(object.proofInit); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenTry): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.previousChannelId !== undefined && - (obj.previousChannelId = message.previousChannelId); - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.counterpartyVersion !== undefined && - (obj.counterpartyVersion = message.counterpartyVersion); - message.proofInit !== undefined && - (obj.proofInit = base64FromBytes( - message.proofInit !== undefined ? message.proofInit : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelOpenTry { - const message = { ...baseMsgChannelOpenTry } as MsgChannelOpenTry; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if ( - object.previousChannelId !== undefined && - object.previousChannelId !== null - ) { - message.previousChannelId = object.previousChannelId; - } else { - message.previousChannelId = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } else { - message.channel = undefined; - } - if ( - object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null - ) { - message.counterpartyVersion = object.counterpartyVersion; - } else { - message.counterpartyVersion = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = object.proofInit; - } else { - message.proofInit = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenTryResponse: object = {}; - -export const MsgChannelOpenTryResponse = { - encode( - _: MsgChannelOpenTryResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenTryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenTryResponse, - } as MsgChannelOpenTryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenTryResponse { - const message = { - ...baseMsgChannelOpenTryResponse, - } as MsgChannelOpenTryResponse; - return message; - }, - - toJSON(_: MsgChannelOpenTryResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenTryResponse { - const message = { - ...baseMsgChannelOpenTryResponse, - } as MsgChannelOpenTryResponse; - return message; - }, -}; - -const baseMsgChannelOpenAck: object = { - portId: "", - channelId: "", - counterpartyChannelId: "", - counterpartyVersion: "", - signer: "", -}; - -export const MsgChannelOpenAck = { - encode(message: MsgChannelOpenAck, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.counterpartyChannelId !== "") { - writer.uint32(26).string(message.counterpartyChannelId); - } - if (message.counterpartyVersion !== "") { - writer.uint32(34).string(message.counterpartyVersion); - } - if (message.proofTry.length !== 0) { - writer.uint32(42).bytes(message.proofTry); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenAck { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenAck } as MsgChannelOpenAck; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannelId = reader.string(); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofTry = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenAck { - const message = { ...baseMsgChannelOpenAck } as MsgChannelOpenAck; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if ( - object.counterpartyChannelId !== undefined && - object.counterpartyChannelId !== null - ) { - message.counterpartyChannelId = String(object.counterpartyChannelId); - } else { - message.counterpartyChannelId = ""; - } - if ( - object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null - ) { - message.counterpartyVersion = String(object.counterpartyVersion); - } else { - message.counterpartyVersion = ""; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = bytesFromBase64(object.proofTry); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenAck): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.counterpartyChannelId !== undefined && - (obj.counterpartyChannelId = message.counterpartyChannelId); - message.counterpartyVersion !== undefined && - (obj.counterpartyVersion = message.counterpartyVersion); - message.proofTry !== undefined && - (obj.proofTry = base64FromBytes( - message.proofTry !== undefined ? message.proofTry : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelOpenAck { - const message = { ...baseMsgChannelOpenAck } as MsgChannelOpenAck; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if ( - object.counterpartyChannelId !== undefined && - object.counterpartyChannelId !== null - ) { - message.counterpartyChannelId = object.counterpartyChannelId; - } else { - message.counterpartyChannelId = ""; - } - if ( - object.counterpartyVersion !== undefined && - object.counterpartyVersion !== null - ) { - message.counterpartyVersion = object.counterpartyVersion; - } else { - message.counterpartyVersion = ""; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = object.proofTry; - } else { - message.proofTry = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenAckResponse: object = {}; - -export const MsgChannelOpenAckResponse = { - encode( - _: MsgChannelOpenAckResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenAckResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenAckResponse, - } as MsgChannelOpenAckResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenAckResponse { - const message = { - ...baseMsgChannelOpenAckResponse, - } as MsgChannelOpenAckResponse; - return message; - }, - - toJSON(_: MsgChannelOpenAckResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenAckResponse { - const message = { - ...baseMsgChannelOpenAckResponse, - } as MsgChannelOpenAckResponse; - return message; - }, -}; - -const baseMsgChannelOpenConfirm: object = { - portId: "", - channelId: "", - signer: "", -}; - -export const MsgChannelOpenConfirm = { - encode( - message: MsgChannelOpenConfirm, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.proofAck.length !== 0) { - writer.uint32(26).bytes(message.proofAck); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenConfirm { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenConfirm } as MsgChannelOpenConfirm; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofAck = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenConfirm { - const message = { ...baseMsgChannelOpenConfirm } as MsgChannelOpenConfirm; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = bytesFromBase64(object.proofAck); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenConfirm): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.proofAck !== undefined && - (obj.proofAck = base64FromBytes( - message.proofAck !== undefined ? message.proofAck : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgChannelOpenConfirm { - const message = { ...baseMsgChannelOpenConfirm } as MsgChannelOpenConfirm; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = object.proofAck; - } else { - message.proofAck = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenConfirmResponse: object = {}; - -export const MsgChannelOpenConfirmResponse = { - encode( - _: MsgChannelOpenConfirmResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenConfirmResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenConfirmResponse, - } as MsgChannelOpenConfirmResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenConfirmResponse { - const message = { - ...baseMsgChannelOpenConfirmResponse, - } as MsgChannelOpenConfirmResponse; - return message; - }, - - toJSON(_: MsgChannelOpenConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenConfirmResponse { - const message = { - ...baseMsgChannelOpenConfirmResponse, - } as MsgChannelOpenConfirmResponse; - return message; - }, -}; - -const baseMsgChannelCloseInit: object = { - portId: "", - channelId: "", - signer: "", -}; - -export const MsgChannelCloseInit = { - encode( - message: MsgChannelCloseInit, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseInit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelCloseInit } as MsgChannelCloseInit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelCloseInit { - const message = { ...baseMsgChannelCloseInit } as MsgChannelCloseInit; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelCloseInit): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelCloseInit { - const message = { ...baseMsgChannelCloseInit } as MsgChannelCloseInit; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelCloseInitResponse: object = {}; - -export const MsgChannelCloseInitResponse = { - encode( - _: MsgChannelCloseInitResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelCloseInitResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelCloseInitResponse, - } as MsgChannelCloseInitResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelCloseInitResponse { - const message = { - ...baseMsgChannelCloseInitResponse, - } as MsgChannelCloseInitResponse; - return message; - }, - - toJSON(_: MsgChannelCloseInitResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelCloseInitResponse { - const message = { - ...baseMsgChannelCloseInitResponse, - } as MsgChannelCloseInitResponse; - return message; - }, -}; - -const baseMsgChannelCloseConfirm: object = { - portId: "", - channelId: "", - signer: "", -}; - -export const MsgChannelCloseConfirm = { - encode( - message: MsgChannelCloseConfirm, - writer: Writer = Writer.create() - ): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.proofInit.length !== 0) { - writer.uint32(26).bytes(message.proofInit); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseConfirm { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelCloseConfirm } as MsgChannelCloseConfirm; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofInit = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelCloseConfirm { - const message = { ...baseMsgChannelCloseConfirm } as MsgChannelCloseConfirm; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = String(object.channelId); - } else { - message.channelId = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = bytesFromBase64(object.proofInit); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelCloseConfirm): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.proofInit !== undefined && - (obj.proofInit = base64FromBytes( - message.proofInit !== undefined ? message.proofInit : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgChannelCloseConfirm { - const message = { ...baseMsgChannelCloseConfirm } as MsgChannelCloseConfirm; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.channelId !== undefined && object.channelId !== null) { - message.channelId = object.channelId; - } else { - message.channelId = ""; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = object.proofInit; - } else { - message.proofInit = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelCloseConfirmResponse: object = {}; - -export const MsgChannelCloseConfirmResponse = { - encode( - _: MsgChannelCloseConfirmResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelCloseConfirmResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelCloseConfirmResponse, - } as MsgChannelCloseConfirmResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelCloseConfirmResponse { - const message = { - ...baseMsgChannelCloseConfirmResponse, - } as MsgChannelCloseConfirmResponse; - return message; - }, - - toJSON(_: MsgChannelCloseConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelCloseConfirmResponse { - const message = { - ...baseMsgChannelCloseConfirmResponse, - } as MsgChannelCloseConfirmResponse; - return message; - }, -}; - -const baseMsgRecvPacket: object = { signer: "" }; - -export const MsgRecvPacket = { - encode(message: MsgRecvPacket, writer: Writer = Writer.create()): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofCommitment.length !== 0) { - writer.uint32(18).bytes(message.proofCommitment); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRecvPacket { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRecvPacket } as MsgRecvPacket; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofCommitment = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgRecvPacket { - const message = { ...baseMsgRecvPacket } as MsgRecvPacket; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proofCommitment !== undefined && - object.proofCommitment !== null - ) { - message.proofCommitment = bytesFromBase64(object.proofCommitment); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgRecvPacket): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofCommitment !== undefined && - (obj.proofCommitment = base64FromBytes( - message.proofCommitment !== undefined - ? message.proofCommitment - : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgRecvPacket { - const message = { ...baseMsgRecvPacket } as MsgRecvPacket; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proofCommitment !== undefined && - object.proofCommitment !== null - ) { - message.proofCommitment = object.proofCommitment; - } else { - message.proofCommitment = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgRecvPacketResponse: object = {}; - -export const MsgRecvPacketResponse = { - encode(_: MsgRecvPacketResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRecvPacketResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRecvPacketResponse } as MsgRecvPacketResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgRecvPacketResponse { - const message = { ...baseMsgRecvPacketResponse } as MsgRecvPacketResponse; - return message; - }, - - toJSON(_: MsgRecvPacketResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgRecvPacketResponse { - const message = { ...baseMsgRecvPacketResponse } as MsgRecvPacketResponse; - return message; - }, -}; - -const baseMsgTimeout: object = { nextSequenceRecv: 0, signer: "" }; - -export const MsgTimeout = { - encode(message: MsgTimeout, writer: Writer = Writer.create()): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofUnreceived.length !== 0) { - writer.uint32(18).bytes(message.proofUnreceived); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.nextSequenceRecv !== 0) { - writer.uint32(32).uint64(message.nextSequenceRecv); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTimeout { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeout } as MsgTimeout; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.nextSequenceRecv = longToNumber(reader.uint64() as Long); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTimeout { - const message = { ...baseMsgTimeout } as MsgTimeout; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proofUnreceived !== undefined && - object.proofUnreceived !== null - ) { - message.proofUnreceived = bytesFromBase64(object.proofUnreceived); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if ( - object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null - ) { - message.nextSequenceRecv = Number(object.nextSequenceRecv); - } else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgTimeout): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofUnreceived !== undefined && - (obj.proofUnreceived = base64FromBytes( - message.proofUnreceived !== undefined - ? message.proofUnreceived - : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.nextSequenceRecv !== undefined && - (obj.nextSequenceRecv = message.nextSequenceRecv); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTimeout { - const message = { ...baseMsgTimeout } as MsgTimeout; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proofUnreceived !== undefined && - object.proofUnreceived !== null - ) { - message.proofUnreceived = object.proofUnreceived; - } else { - message.proofUnreceived = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if ( - object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null - ) { - message.nextSequenceRecv = object.nextSequenceRecv; - } else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgTimeoutResponse: object = {}; - -export const MsgTimeoutResponse = { - encode(_: MsgTimeoutResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeoutResponse } as MsgTimeoutResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgTimeoutResponse { - const message = { ...baseMsgTimeoutResponse } as MsgTimeoutResponse; - return message; - }, - - toJSON(_: MsgTimeoutResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgTimeoutResponse { - const message = { ...baseMsgTimeoutResponse } as MsgTimeoutResponse; - return message; - }, -}; - -const baseMsgTimeoutOnClose: object = { nextSequenceRecv: 0, signer: "" }; - -export const MsgTimeoutOnClose = { - encode(message: MsgTimeoutOnClose, writer: Writer = Writer.create()): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofUnreceived.length !== 0) { - writer.uint32(18).bytes(message.proofUnreceived); - } - if (message.proofClose.length !== 0) { - writer.uint32(26).bytes(message.proofClose); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.nextSequenceRecv !== 0) { - writer.uint32(40).uint64(message.nextSequenceRecv); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutOnClose { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeoutOnClose } as MsgTimeoutOnClose; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofClose = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.nextSequenceRecv = longToNumber(reader.uint64() as Long); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTimeoutOnClose { - const message = { ...baseMsgTimeoutOnClose } as MsgTimeoutOnClose; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proofUnreceived !== undefined && - object.proofUnreceived !== null - ) { - message.proofUnreceived = bytesFromBase64(object.proofUnreceived); - } - if (object.proofClose !== undefined && object.proofClose !== null) { - message.proofClose = bytesFromBase64(object.proofClose); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if ( - object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null - ) { - message.nextSequenceRecv = Number(object.nextSequenceRecv); - } else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgTimeoutOnClose): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofUnreceived !== undefined && - (obj.proofUnreceived = base64FromBytes( - message.proofUnreceived !== undefined - ? message.proofUnreceived - : new Uint8Array() - )); - message.proofClose !== undefined && - (obj.proofClose = base64FromBytes( - message.proofClose !== undefined ? message.proofClose : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.nextSequenceRecv !== undefined && - (obj.nextSequenceRecv = message.nextSequenceRecv); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTimeoutOnClose { - const message = { ...baseMsgTimeoutOnClose } as MsgTimeoutOnClose; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proofUnreceived !== undefined && - object.proofUnreceived !== null - ) { - message.proofUnreceived = object.proofUnreceived; - } else { - message.proofUnreceived = new Uint8Array(); - } - if (object.proofClose !== undefined && object.proofClose !== null) { - message.proofClose = object.proofClose; - } else { - message.proofClose = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if ( - object.nextSequenceRecv !== undefined && - object.nextSequenceRecv !== null - ) { - message.nextSequenceRecv = object.nextSequenceRecv; - } else { - message.nextSequenceRecv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgTimeoutOnCloseResponse: object = {}; - -export const MsgTimeoutOnCloseResponse = { - encode( - _: MsgTimeoutOnCloseResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgTimeoutOnCloseResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgTimeoutOnCloseResponse, - } as MsgTimeoutOnCloseResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgTimeoutOnCloseResponse { - const message = { - ...baseMsgTimeoutOnCloseResponse, - } as MsgTimeoutOnCloseResponse; - return message; - }, - - toJSON(_: MsgTimeoutOnCloseResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgTimeoutOnCloseResponse { - const message = { - ...baseMsgTimeoutOnCloseResponse, - } as MsgTimeoutOnCloseResponse; - return message; - }, -}; - -const baseMsgAcknowledgement: object = { signer: "" }; - -export const MsgAcknowledgement = { - encode( - message: MsgAcknowledgement, - writer: Writer = Writer.create() - ): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.acknowledgement.length !== 0) { - writer.uint32(18).bytes(message.acknowledgement); - } - if (message.proofAcked.length !== 0) { - writer.uint32(26).bytes(message.proofAcked); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgAcknowledgement { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgAcknowledgement } as MsgAcknowledgement; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proofAcked = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgAcknowledgement { - const message = { ...baseMsgAcknowledgement } as MsgAcknowledgement; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = bytesFromBase64(object.acknowledgement); - } - if (object.proofAcked !== undefined && object.proofAcked !== null) { - message.proofAcked = bytesFromBase64(object.proofAcked); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgAcknowledgement): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.acknowledgement !== undefined && - (obj.acknowledgement = base64FromBytes( - message.acknowledgement !== undefined - ? message.acknowledgement - : new Uint8Array() - )); - message.proofAcked !== undefined && - (obj.proofAcked = base64FromBytes( - message.proofAcked !== undefined ? message.proofAcked : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgAcknowledgement { - const message = { ...baseMsgAcknowledgement } as MsgAcknowledgement; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = object.acknowledgement; - } else { - message.acknowledgement = new Uint8Array(); - } - if (object.proofAcked !== undefined && object.proofAcked !== null) { - message.proofAcked = object.proofAcked; - } else { - message.proofAcked = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgAcknowledgementResponse: object = {}; - -export const MsgAcknowledgementResponse = { - encode( - _: MsgAcknowledgementResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAcknowledgementResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAcknowledgementResponse, - } as MsgAcknowledgementResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgAcknowledgementResponse { - const message = { - ...baseMsgAcknowledgementResponse, - } as MsgAcknowledgementResponse; - return message; - }, - - toJSON(_: MsgAcknowledgementResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgAcknowledgementResponse { - const message = { - ...baseMsgAcknowledgementResponse, - } as MsgAcknowledgementResponse; - return message; - }, -}; - -/** Msg defines the ibc/channel Msg service. */ -export interface Msg { - /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ - ChannelOpenInit( - request: MsgChannelOpenInit - ): Promise; - /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ - ChannelOpenTry( - request: MsgChannelOpenTry - ): Promise; - /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ - ChannelOpenAck( - request: MsgChannelOpenAck - ): Promise; - /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ - ChannelOpenConfirm( - request: MsgChannelOpenConfirm - ): Promise; - /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ - ChannelCloseInit( - request: MsgChannelCloseInit - ): Promise; - /** ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. */ - ChannelCloseConfirm( - request: MsgChannelCloseConfirm - ): Promise; - /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ - RecvPacket(request: MsgRecvPacket): Promise; - /** Timeout defines a rpc handler method for MsgTimeout. */ - Timeout(request: MsgTimeout): Promise; - /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ - TimeoutOnClose( - request: MsgTimeoutOnClose - ): Promise; - /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ - Acknowledgement( - request: MsgAcknowledgement - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ChannelOpenInit( - request: MsgChannelOpenInit - ): Promise { - const data = MsgChannelOpenInit.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenInit", - data - ); - return promise.then((data) => - MsgChannelOpenInitResponse.decode(new Reader(data)) - ); - } - - ChannelOpenTry( - request: MsgChannelOpenTry - ): Promise { - const data = MsgChannelOpenTry.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenTry", - data - ); - return promise.then((data) => - MsgChannelOpenTryResponse.decode(new Reader(data)) - ); - } - - ChannelOpenAck( - request: MsgChannelOpenAck - ): Promise { - const data = MsgChannelOpenAck.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenAck", - data - ); - return promise.then((data) => - MsgChannelOpenAckResponse.decode(new Reader(data)) - ); - } - - ChannelOpenConfirm( - request: MsgChannelOpenConfirm - ): Promise { - const data = MsgChannelOpenConfirm.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenConfirm", - data - ); - return promise.then((data) => - MsgChannelOpenConfirmResponse.decode(new Reader(data)) - ); - } - - ChannelCloseInit( - request: MsgChannelCloseInit - ): Promise { - const data = MsgChannelCloseInit.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelCloseInit", - data - ); - return promise.then((data) => - MsgChannelCloseInitResponse.decode(new Reader(data)) - ); - } - - ChannelCloseConfirm( - request: MsgChannelCloseConfirm - ): Promise { - const data = MsgChannelCloseConfirm.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelCloseConfirm", - data - ); - return promise.then((data) => - MsgChannelCloseConfirmResponse.decode(new Reader(data)) - ); - } - - RecvPacket(request: MsgRecvPacket): Promise { - const data = MsgRecvPacket.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "RecvPacket", - data - ); - return promise.then((data) => - MsgRecvPacketResponse.decode(new Reader(data)) - ); - } - - Timeout(request: MsgTimeout): Promise { - const data = MsgTimeout.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "Timeout", - data - ); - return promise.then((data) => MsgTimeoutResponse.decode(new Reader(data))); - } - - TimeoutOnClose( - request: MsgTimeoutOnClose - ): Promise { - const data = MsgTimeoutOnClose.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "TimeoutOnClose", - data - ); - return promise.then((data) => - MsgTimeoutOnCloseResponse.decode(new Reader(data)) - ); - } - - Acknowledgement( - request: MsgAcknowledgement - ): Promise { - const data = MsgAcknowledgement.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "Acknowledgement", - data - ); - return promise.then((data) => - MsgAcknowledgementResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.d.ts deleted file mode 100644 index eef05fd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} -export declare const IdentifiedClientState: { - encode(message: IdentifiedClientState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState; - fromJSON(object: any): IdentifiedClientState; - toJSON(message: IdentifiedClientState): unknown; - fromPartial(object: DeepPartial): IdentifiedClientState; -}; -export declare const ConsensusStateWithHeight: { - encode(message: ConsensusStateWithHeight, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusStateWithHeight; - fromJSON(object: any): ConsensusStateWithHeight; - toJSON(message: ConsensusStateWithHeight): unknown; - fromPartial(object: DeepPartial): ConsensusStateWithHeight; -}; -export declare const ClientConsensusStates: { - encode(message: ClientConsensusStates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates; - fromJSON(object: any): ClientConsensusStates; - toJSON(message: ClientConsensusStates): unknown; - fromPartial(object: DeepPartial): ClientConsensusStates; -}; -export declare const ClientUpdateProposal: { - encode(message: ClientUpdateProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal; - fromJSON(object: any): ClientUpdateProposal; - toJSON(message: ClientUpdateProposal): unknown; - fromPartial(object: DeepPartial): ClientUpdateProposal; -}; -export declare const Height: { - encode(message: Height, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Height; - fromJSON(object: any): Height; - toJSON(message: Height): unknown; - fromPartial(object: DeepPartial): Height; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.js deleted file mode 100644 index 52a38ad..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.js +++ /dev/null @@ -1,500 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.client.v1"; -const baseIdentifiedClientState = { clientId: "" }; -export const IdentifiedClientState = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, -}; -const baseConsensusStateWithHeight = {}; -export const ConsensusStateWithHeight = { - encode(message, writer = Writer.create()) { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, -}; -const baseClientConsensusStates = { clientId: "" }; -export const ClientConsensusStates = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } - else { - obj.consensusStates = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; -const baseClientUpdateProposal = { - title: "", - description: "", - clientId: "", -}; -export const ClientUpdateProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } - else { - message.header = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } - else { - message.header = undefined; - } - return message; - }, -}; -const baseHeight = { revisionNumber: 0, revisionHeight: 0 }; -export const Height = { - encode(message, writer = Writer.create()) { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseParams = { allowedClients: "" }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.allowedClients) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } - else { - obj.allowedClients = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index 7ca2f60..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,624 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} - -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} - -const baseIdentifiedClientState: object = { clientId: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { clientId: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensusStates = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - clientId: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } else { - message.header = undefined; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } else { - message.header = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revisionNumber: 0, revisionHeight: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseParams: object = { allowedClients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowedClients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } else { - obj.allowedClients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.channel.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.js deleted file mode 100644 index 78d9f89..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.js +++ /dev/null @@ -1,345 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { IdentifiedClientState } from "./module/types/ibc/core/client/v1/client"; -import { ConsensusStateWithHeight } from "./module/types/ibc/core/client/v1/client"; -import { ClientConsensusStates } from "./module/types/ibc/core/client/v1/client"; -import { ClientUpdateProposal } from "./module/types/ibc/core/client/v1/client"; -import { Height } from "./module/types/ibc/core/client/v1/client"; -import { Params } from "./module/types/ibc/core/client/v1/client"; -import { GenesisMetadata } from "./module/types/ibc/core/client/v1/genesis"; -import { IdentifiedGenesisMetadata } from "./module/types/ibc/core/client/v1/genesis"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - ClientState: {}, - ClientStates: {}, - ConsensusState: {}, - ConsensusStates: {}, - ClientParams: {}, - _Structure: { - IdentifiedClientState: getStructure(IdentifiedClientState.fromPartial({})), - ConsensusStateWithHeight: getStructure(ConsensusStateWithHeight.fromPartial({})), - ClientConsensusStates: getStructure(ClientConsensusStates.fromPartial({})), - ClientUpdateProposal: getStructure(ClientUpdateProposal.fromPartial({})), - Height: getStructure(Height.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - GenesisMetadata: getStructure(GenesisMetadata.fromPartial({})), - IdentifiedGenesisMetadata: getStructure(IdentifiedGenesisMetadata.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getClientState: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ClientState[JSON.stringify(params)] ?? {}; - }, - getClientStates: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ClientStates[JSON.stringify(params)] ?? {}; - }, - getConsensusState: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ConsensusState[JSON.stringify(params)] ?? {}; - }, - getConsensusStates: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ConsensusStates[JSON.stringify(params)] ?? {}; - }, - getClientParams: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ClientParams[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryClientState({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryClientState(key.client_id, query)).data : (await (await initQueryClient(rootGetters)).queryClientState(key.client_id)).data; - commit('QUERY', { query: 'ClientState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryClientState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getClientState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientState', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryClientStates({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryClientStates(query)).data : (await (await initQueryClient(rootGetters)).queryClientStates()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryClientStates({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ClientStates', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryClientStates', payload: { options: { all }, params: { ...key }, query } }); - return getters['getClientStates']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientStates', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryConsensusState({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConsensusState(key.client_id, key.revision_number, key.revision_height, query)).data : (await (await initQueryClient(rootGetters)).queryConsensusState(key.client_id, key.revision_number, key.revision_height)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryConsensusState(key.client_id, key.revision_number, key.revision_height, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ConsensusState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConsensusState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConsensusState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConsensusState', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryConsensusStates({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConsensusStates(key.client_id, query)).data : (await (await initQueryClient(rootGetters)).queryConsensusStates(key.client_id)).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryConsensusStates(key.client_id, { ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'ConsensusStates', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConsensusStates', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConsensusStates']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConsensusStates', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryClientParams({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryClientParams(query)).data : (await (await initQueryClient(rootGetters)).queryClientParams()).data; - commit('QUERY', { query: 'ClientParams', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryClientParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getClientParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientParams', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgUpgradeClient({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpgradeClient(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUpgradeClient:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUpgradeClient:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgUpdateClient({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpdateClient(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUpdateClient:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUpdateClient:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgCreateClient({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateClient(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgCreateClient:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateClient:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgSubmitMisbehaviour({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitMisbehaviour(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgUpgradeClient({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpgradeClient(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUpgradeClient:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUpgradeClient:Create', 'Could not create message.'); - } - } - }, - async MsgUpdateClient({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpdateClient(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgUpdateClient:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUpdateClient:Create', 'Could not create message.'); - } - } - }, - async MsgCreateClient({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateClient(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgCreateClient:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateClient:Create', 'Could not create message.'); - } - } - }, - async MsgSubmitMisbehaviour({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitMisbehaviour(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.ts deleted file mode 100644 index 4a5aed5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/index.ts +++ /dev/null @@ -1,343 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { IdentifiedClientState } from "./module/types/ibc/core/client/v1/client" -import { ConsensusStateWithHeight } from "./module/types/ibc/core/client/v1/client" -import { ClientConsensusStates } from "./module/types/ibc/core/client/v1/client" -import { ClientUpdateProposal } from "./module/types/ibc/core/client/v1/client" -import { Height } from "./module/types/ibc/core/client/v1/client" -import { Params } from "./module/types/ibc/core/client/v1/client" -import { GenesisMetadata } from "./module/types/ibc/core/client/v1/genesis" -import { IdentifiedGenesisMetadata } from "./module/types/ibc/core/client/v1/genesis" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - ClientState: {}, - ClientStates: {}, - ConsensusState: {}, - ConsensusStates: {}, - ClientParams: {}, - - _Structure: { - IdentifiedClientState: getStructure(IdentifiedClientState.fromPartial({})), - ConsensusStateWithHeight: getStructure(ConsensusStateWithHeight.fromPartial({})), - ClientConsensusStates: getStructure(ClientConsensusStates.fromPartial({})), - ClientUpdateProposal: getStructure(ClientUpdateProposal.fromPartial({})), - Height: getStructure(Height.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - GenesisMetadata: getStructure(GenesisMetadata.fromPartial({})), - IdentifiedGenesisMetadata: getStructure(IdentifiedGenesisMetadata.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getClientState: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientState[JSON.stringify(params)] ?? {} - }, - getClientStates: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientStates[JSON.stringify(params)] ?? {} - }, - getConsensusState: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConsensusState[JSON.stringify(params)] ?? {} - }, - getConsensusStates: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConsensusStates[JSON.stringify(params)] ?? {} - }, - getClientParams: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientParams[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryClientState({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryClientState( key.client_id, query)).data:(await (await initQueryClient(rootGetters)).queryClientState( key.client_id )).data - - commit('QUERY', { query: 'ClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientState', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryClientStates({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryClientStates( query)).data:(await (await initQueryClient(rootGetters)).queryClientStates()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryClientStates({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ClientStates', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientStates', payload: { options: { all }, params: {...key},query }}) - return getters['getClientStates']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientStates', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryConsensusState({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConsensusState( key.client_id, key.revision_number, key.revision_height, query)).data:(await (await initQueryClient(rootGetters)).queryConsensusState( key.client_id , key.revision_number , key.revision_height )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryConsensusState( key.client_id, key.revision_number, key.revision_height, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConsensusState', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryConsensusStates({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConsensusStates( key.client_id, query)).data:(await (await initQueryClient(rootGetters)).queryConsensusStates( key.client_id )).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryConsensusStates( key.client_id, {...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'ConsensusStates', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConsensusStates', payload: { options: { all }, params: {...key},query }}) - return getters['getConsensusStates']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConsensusStates', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryClientParams({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryClientParams( query)).data:(await (await initQueryClient(rootGetters)).queryClientParams()).data - - commit('QUERY', { query: 'ClientParams', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientParams', payload: { options: { all }, params: {...key},query }}) - return getters['getClientParams']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientParams', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgUpgradeClient({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpgradeClient(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUpgradeClient:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUpgradeClient:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgUpdateClient({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpdateClient(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUpdateClient:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUpdateClient:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgCreateClient({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateClient(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgCreateClient:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgCreateClient:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgSubmitMisbehaviour({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitMisbehaviour(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgUpgradeClient({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpgradeClient(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUpgradeClient:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUpgradeClient:Create', 'Could not create message.') - } - } - }, - async MsgUpdateClient({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgUpdateClient(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgUpdateClient:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgUpdateClient:Create', 'Could not create message.') - } - } - }, - async MsgCreateClient({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgCreateClient(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgCreateClient:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgCreateClient:Create', 'Could not create message.') - } - } - }, - async MsgSubmitMisbehaviour({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgSubmitMisbehaviour(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgSubmitMisbehaviour:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.d.ts deleted file mode 100644 index 82c9c1d..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUpgradeClient } from "./types/ibc/core/client/v1/tx"; -import { MsgUpdateClient } from "./types/ibc/core/client/v1/tx"; -import { MsgCreateClient } from "./types/ibc/core/client/v1/tx"; -import { MsgSubmitMisbehaviour } from "./types/ibc/core/client/v1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgUpgradeClient: (data: MsgUpgradeClient) => EncodeObject; - msgUpdateClient: (data: MsgUpdateClient) => EncodeObject; - msgCreateClient: (data: MsgCreateClient) => EncodeObject; - msgSubmitMisbehaviour: (data: MsgSubmitMisbehaviour) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.js deleted file mode 100644 index dd0c0a2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.js +++ /dev/null @@ -1,36 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUpgradeClient } from "./types/ibc/core/client/v1/tx"; -import { MsgUpdateClient } from "./types/ibc/core/client/v1/tx"; -import { MsgCreateClient } from "./types/ibc/core/client/v1/tx"; -import { MsgSubmitMisbehaviour } from "./types/ibc/core/client/v1/tx"; -const types = [ - ["/ibc.core.client.v1.MsgUpgradeClient", MsgUpgradeClient], - ["/ibc.core.client.v1.MsgUpdateClient", MsgUpdateClient], - ["/ibc.core.client.v1.MsgCreateClient", MsgCreateClient], - ["/ibc.core.client.v1.MsgSubmitMisbehaviour", MsgSubmitMisbehaviour], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgUpgradeClient: (data) => ({ typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", value: data }), - msgUpdateClient: (data) => ({ typeUrl: "/ibc.core.client.v1.MsgUpdateClient", value: data }), - msgCreateClient: (data) => ({ typeUrl: "/ibc.core.client.v1.MsgCreateClient", value: data }), - msgSubmitMisbehaviour: (data) => ({ typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.ts deleted file mode 100644 index 3bf3b93..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUpgradeClient } from "./types/ibc/core/client/v1/tx"; -import { MsgUpdateClient } from "./types/ibc/core/client/v1/tx"; -import { MsgCreateClient } from "./types/ibc/core/client/v1/tx"; -import { MsgSubmitMisbehaviour } from "./types/ibc/core/client/v1/tx"; - - -const types = [ - ["/ibc.core.client.v1.MsgUpgradeClient", MsgUpgradeClient], - ["/ibc.core.client.v1.MsgUpdateClient", MsgUpdateClient], - ["/ibc.core.client.v1.MsgCreateClient", MsgCreateClient], - ["/ibc.core.client.v1.MsgSubmitMisbehaviour", MsgSubmitMisbehaviour], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgUpgradeClient: (data: MsgUpgradeClient): EncodeObject => ({ typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", value: data }), - msgUpdateClient: (data: MsgUpdateClient): EncodeObject => ({ typeUrl: "/ibc.core.client.v1.MsgUpdateClient", value: data }), - msgCreateClient: (data: MsgCreateClient): EncodeObject => ({ typeUrl: "/ibc.core.client.v1.MsgCreateClient", value: data }), - msgSubmitMisbehaviour: (data: MsgSubmitMisbehaviour): EncodeObject => ({ typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.d.ts deleted file mode 100644 index 645e206..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.d.ts +++ /dev/null @@ -1,744 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** - * ConsensusStateWithHeight defines a consensus state with an additional height field. - */ -export interface V1ConsensusStateWithHeight { - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; -} -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - /** @format uint64 */ - revisionHeight?: string; -} -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - clientId?: string; - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; -} -/** - * MsgCreateClientResponse defines the Msg/CreateClient response type. - */ -export declare type V1MsgCreateClientResponse = object; -/** - * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. - */ -export declare type V1MsgSubmitMisbehaviourResponse = object; -/** - * MsgUpdateClientResponse defines the Msg/UpdateClient response type. - */ -export declare type V1MsgUpdateClientResponse = object; -/** - * MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. - */ -export declare type V1MsgUpgradeClientResponse = object; -/** - * Params defines the set of IBC light client parameters. - */ -export interface V1Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients?: string[]; -} -/** - * QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. - */ -export interface V1QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Params; -} -/** -* QueryClientStateResponse is the response type for the Query/ClientState RPC -method. Besides the client state, it includes a proof and the height from -which the proof was retrieved. -*/ -export interface V1QueryClientStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -/** -* QueryClientStatesResponse is the response type for the Query/ClientStates RPC -method. -*/ -export interface V1QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - clientStates?: V1IdentifiedClientState[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; -} -export interface V1QueryConsensusStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryConsensusStatesResponse { - consensusStates?: V1ConsensusStateWithHeight[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title ibc/core/client/v1/client.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryClientParams - * @summary ClientParams queries all parameters of the ibc client. - * @request GET:/ibc/client/v1beta1/params - */ - queryClientParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryClientStates - * @summary ClientStates queries all the IBC light clients of a chain. - * @request GET:/ibc/core/client/v1beta1/client_states - */ - queryClientStates: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryClientState - * @summary ClientState queries an IBC light client. - * @request GET:/ibc/core/client/v1beta1/client_states/{clientId} - */ - queryClientState: (clientId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConsensusStates - * @summary ConsensusStates queries all the consensus state associated with a given - client. - * @request GET:/ibc/core/client/v1beta1/consensus_states/{clientId} - */ - queryConsensusStates: (clientId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConsensusState - * @summary ConsensusState queries a consensus state associated with a client state at - a given height. - * @request GET:/ibc/core/client/v1beta1/consensus_states/{clientId}/revision/{revisionNumber}/height/{revisionHeight} - */ - queryConsensusState: (clientId: string, revisionNumber: string, revisionHeight: string, query?: { - latestHeight?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.js deleted file mode 100644 index cabd4ff..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.js +++ /dev/null @@ -1,215 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title ibc/core/client/v1/client.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryClientParams - * @summary ClientParams queries all parameters of the ibc client. - * @request GET:/ibc/client/v1beta1/params - */ - this.queryClientParams = (params = {}) => this.request({ - path: `/ibc/client/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryClientStates - * @summary ClientStates queries all the IBC light clients of a chain. - * @request GET:/ibc/core/client/v1beta1/client_states - */ - this.queryClientStates = (query, params = {}) => this.request({ - path: `/ibc/core/client/v1beta1/client_states`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryClientState - * @summary ClientState queries an IBC light client. - * @request GET:/ibc/core/client/v1beta1/client_states/{clientId} - */ - this.queryClientState = (clientId, params = {}) => this.request({ - path: `/ibc/core/client/v1beta1/client_states/${clientId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConsensusStates - * @summary ConsensusStates queries all the consensus state associated with a given - client. - * @request GET:/ibc/core/client/v1beta1/consensus_states/{clientId} - */ - this.queryConsensusStates = (clientId, query, params = {}) => this.request({ - path: `/ibc/core/client/v1beta1/consensus_states/${clientId}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConsensusState - * @summary ConsensusState queries a consensus state associated with a client state at - a given height. - * @request GET:/ibc/core/client/v1beta1/consensus_states/{clientId}/revision/{revisionNumber}/height/{revisionHeight} - */ - this.queryConsensusState = (clientId, revisionNumber, revisionHeight, query, params = {}) => this.request({ - path: `/ibc/core/client/v1beta1/consensus_states/${clientId}/revision/${revisionNumber}/height/${revisionHeight}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.ts deleted file mode 100644 index 6bb68f6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/rest.ts +++ /dev/null @@ -1,971 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** - * ConsensusStateWithHeight defines a consensus state with an additional height field. - */ -export interface V1ConsensusStateWithHeight { - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; - - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; -} - -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - - /** @format uint64 */ - revisionHeight?: string; -} - -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - clientId?: string; - - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; -} - -/** - * MsgCreateClientResponse defines the Msg/CreateClient response type. - */ -export type V1MsgCreateClientResponse = object; - -/** - * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. - */ -export type V1MsgSubmitMisbehaviourResponse = object; - -/** - * MsgUpdateClientResponse defines the Msg/UpdateClient response type. - */ -export type V1MsgUpdateClientResponse = object; - -/** - * MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. - */ -export type V1MsgUpgradeClientResponse = object; - -/** - * Params defines the set of IBC light client parameters. - */ -export interface V1Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients?: string[]; -} - -/** - * QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. - */ -export interface V1QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Params; -} - -/** -* QueryClientStateResponse is the response type for the Query/ClientState RPC -method. Besides the client state, it includes a proof and the height from -which the proof was retrieved. -*/ -export interface V1QueryClientStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -/** -* QueryClientStatesResponse is the response type for the Query/ClientStates RPC -method. -*/ -export interface V1QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - clientStates?: V1IdentifiedClientState[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; -} - -export interface V1QueryConsensusStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryConsensusStatesResponse { - consensusStates?: V1ConsensusStateWithHeight[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/core/client/v1/client.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryClientParams - * @summary ClientParams queries all parameters of the ibc client. - * @request GET:/ibc/client/v1beta1/params - */ - queryClientParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/client/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryClientStates - * @summary ClientStates queries all the IBC light clients of a chain. - * @request GET:/ibc/core/client/v1beta1/client_states - */ - queryClientStates = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/client/v1beta1/client_states`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryClientState - * @summary ClientState queries an IBC light client. - * @request GET:/ibc/core/client/v1beta1/client_states/{clientId} - */ - queryClientState = (clientId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/client/v1beta1/client_states/${clientId}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConsensusStates - * @summary ConsensusStates queries all the consensus state associated with a given -client. - * @request GET:/ibc/core/client/v1beta1/consensus_states/{clientId} - */ - queryConsensusStates = ( - clientId: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/client/v1beta1/consensus_states/${clientId}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConsensusState - * @summary ConsensusState queries a consensus state associated with a client state at -a given height. - * @request GET:/ibc/core/client/v1beta1/consensus_states/{clientId}/revision/{revisionNumber}/height/{revisionHeight} - */ - queryConsensusState = ( - clientId: string, - revisionNumber: string, - revisionHeight: string, - query?: { latestHeight?: boolean }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/client/v1beta1/consensus_states/${clientId}/revision/${revisionNumber}/height/${revisionHeight}`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.d.ts deleted file mode 100644 index eef05fd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} -export declare const IdentifiedClientState: { - encode(message: IdentifiedClientState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState; - fromJSON(object: any): IdentifiedClientState; - toJSON(message: IdentifiedClientState): unknown; - fromPartial(object: DeepPartial): IdentifiedClientState; -}; -export declare const ConsensusStateWithHeight: { - encode(message: ConsensusStateWithHeight, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusStateWithHeight; - fromJSON(object: any): ConsensusStateWithHeight; - toJSON(message: ConsensusStateWithHeight): unknown; - fromPartial(object: DeepPartial): ConsensusStateWithHeight; -}; -export declare const ClientConsensusStates: { - encode(message: ClientConsensusStates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates; - fromJSON(object: any): ClientConsensusStates; - toJSON(message: ClientConsensusStates): unknown; - fromPartial(object: DeepPartial): ClientConsensusStates; -}; -export declare const ClientUpdateProposal: { - encode(message: ClientUpdateProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal; - fromJSON(object: any): ClientUpdateProposal; - toJSON(message: ClientUpdateProposal): unknown; - fromPartial(object: DeepPartial): ClientUpdateProposal; -}; -export declare const Height: { - encode(message: Height, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Height; - fromJSON(object: any): Height; - toJSON(message: Height): unknown; - fromPartial(object: DeepPartial): Height; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.js deleted file mode 100644 index 52a38ad..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.js +++ /dev/null @@ -1,500 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.client.v1"; -const baseIdentifiedClientState = { clientId: "" }; -export const IdentifiedClientState = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, -}; -const baseConsensusStateWithHeight = {}; -export const ConsensusStateWithHeight = { - encode(message, writer = Writer.create()) { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, -}; -const baseClientConsensusStates = { clientId: "" }; -export const ClientConsensusStates = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } - else { - obj.consensusStates = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; -const baseClientUpdateProposal = { - title: "", - description: "", - clientId: "", -}; -export const ClientUpdateProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } - else { - message.header = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } - else { - message.header = undefined; - } - return message; - }, -}; -const baseHeight = { revisionNumber: 0, revisionHeight: 0 }; -export const Height = { - encode(message, writer = Writer.create()) { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseParams = { allowedClients: "" }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.allowedClients) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } - else { - obj.allowedClients = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index 7ca2f60..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,624 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} - -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} - -const baseIdentifiedClientState: object = { clientId: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { clientId: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensusStates = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - clientId: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } else { - message.header = undefined; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } else { - message.header = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revisionNumber: 0, revisionHeight: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseParams: object = { allowedClients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowedClients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } else { - obj.allowedClients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.d.ts deleted file mode 100644 index 762f1a0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { IdentifiedClientState, ClientConsensusStates, Params } from "../../../../ibc/core/client/v1/client"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** GenesisState defines the ibc client submodule's genesis state. */ -export interface GenesisState { - /** client states with their corresponding identifiers */ - clients: IdentifiedClientState[]; - /** consensus states from each client */ - clientsConsensus: ClientConsensusStates[]; - /** metadata from each client */ - clientsMetadata: IdentifiedGenesisMetadata[]; - params: Params | undefined; - /** create localhost on initialization */ - createLocalhost: boolean; - /** the sequence for the next generated client identifier */ - nextClientSequence: number; -} -/** - * GenesisMetadata defines the genesis type for metadata that clients may return - * with ExportMetadata - */ -export interface GenesisMetadata { - /** store key of metadata without clientID-prefix */ - key: Uint8Array; - /** metadata value */ - value: Uint8Array; -} -/** IdentifiedGenesisMetadata has the client metadata with the corresponding client id. */ -export interface IdentifiedGenesisMetadata { - clientId: string; - clientMetadata: GenesisMetadata[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const GenesisMetadata: { - encode(message: GenesisMetadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisMetadata; - fromJSON(object: any): GenesisMetadata; - toJSON(message: GenesisMetadata): unknown; - fromPartial(object: DeepPartial): GenesisMetadata; -}; -export declare const IdentifiedGenesisMetadata: { - encode(message: IdentifiedGenesisMetadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedGenesisMetadata; - fromJSON(object: any): IdentifiedGenesisMetadata; - toJSON(message: IdentifiedGenesisMetadata): unknown; - fromPartial(object: DeepPartial): IdentifiedGenesisMetadata; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.js deleted file mode 100644 index 9629a0e..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.js +++ /dev/null @@ -1,371 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { IdentifiedClientState, ClientConsensusStates, Params, } from "../../../../ibc/core/client/v1/client"; -export const protobufPackage = "ibc.core.client.v1"; -const baseGenesisState = { - createLocalhost: false, - nextClientSequence: 0, -}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.clients) { - IdentifiedClientState.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clientsConsensus) { - ClientConsensusStates.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.clientsMetadata) { - IdentifiedGenesisMetadata.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); - } - if (message.createLocalhost === true) { - writer.uint32(40).bool(message.createLocalhost); - } - if (message.nextClientSequence !== 0) { - writer.uint32(48).uint64(message.nextClientSequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.clients = []; - message.clientsConsensus = []; - message.clientsMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clients.push(IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - message.clientsConsensus.push(ClientConsensusStates.decode(reader, reader.uint32())); - break; - case 3: - message.clientsMetadata.push(IdentifiedGenesisMetadata.decode(reader, reader.uint32())); - break; - case 4: - message.params = Params.decode(reader, reader.uint32()); - break; - case 5: - message.createLocalhost = reader.bool(); - break; - case 6: - message.nextClientSequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.clients = []; - message.clientsConsensus = []; - message.clientsMetadata = []; - if (object.clients !== undefined && object.clients !== null) { - for (const e of object.clients) { - message.clients.push(IdentifiedClientState.fromJSON(e)); - } - } - if (object.clientsConsensus !== undefined && - object.clientsConsensus !== null) { - for (const e of object.clientsConsensus) { - message.clientsConsensus.push(ClientConsensusStates.fromJSON(e)); - } - } - if (object.clientsMetadata !== undefined && - object.clientsMetadata !== null) { - for (const e of object.clientsMetadata) { - message.clientsMetadata.push(IdentifiedGenesisMetadata.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.createLocalhost !== undefined && - object.createLocalhost !== null) { - message.createLocalhost = Boolean(object.createLocalhost); - } - else { - message.createLocalhost = false; - } - if (object.nextClientSequence !== undefined && - object.nextClientSequence !== null) { - message.nextClientSequence = Number(object.nextClientSequence); - } - else { - message.nextClientSequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.clients) { - obj.clients = message.clients.map((e) => e ? IdentifiedClientState.toJSON(e) : undefined); - } - else { - obj.clients = []; - } - if (message.clientsConsensus) { - obj.clientsConsensus = message.clientsConsensus.map((e) => e ? ClientConsensusStates.toJSON(e) : undefined); - } - else { - obj.clientsConsensus = []; - } - if (message.clientsMetadata) { - obj.clientsMetadata = message.clientsMetadata.map((e) => e ? IdentifiedGenesisMetadata.toJSON(e) : undefined); - } - else { - obj.clientsMetadata = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.createLocalhost !== undefined && - (obj.createLocalhost = message.createLocalhost); - message.nextClientSequence !== undefined && - (obj.nextClientSequence = message.nextClientSequence); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.clients = []; - message.clientsConsensus = []; - message.clientsMetadata = []; - if (object.clients !== undefined && object.clients !== null) { - for (const e of object.clients) { - message.clients.push(IdentifiedClientState.fromPartial(e)); - } - } - if (object.clientsConsensus !== undefined && - object.clientsConsensus !== null) { - for (const e of object.clientsConsensus) { - message.clientsConsensus.push(ClientConsensusStates.fromPartial(e)); - } - } - if (object.clientsMetadata !== undefined && - object.clientsMetadata !== null) { - for (const e of object.clientsMetadata) { - message.clientsMetadata.push(IdentifiedGenesisMetadata.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.createLocalhost !== undefined && - object.createLocalhost !== null) { - message.createLocalhost = object.createLocalhost; - } - else { - message.createLocalhost = false; - } - if (object.nextClientSequence !== undefined && - object.nextClientSequence !== null) { - message.nextClientSequence = object.nextClientSequence; - } - else { - message.nextClientSequence = 0; - } - return message; - }, -}; -const baseGenesisMetadata = {}; -export const GenesisMetadata = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisMetadata }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisMetadata }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisMetadata }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -const baseIdentifiedGenesisMetadata = { clientId: "" }; -export const IdentifiedGenesisMetadata = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.clientMetadata) { - GenesisMetadata.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseIdentifiedGenesisMetadata, - }; - message.clientMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientMetadata.push(GenesisMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseIdentifiedGenesisMetadata, - }; - message.clientMetadata = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientMetadata !== undefined && object.clientMetadata !== null) { - for (const e of object.clientMetadata) { - message.clientMetadata.push(GenesisMetadata.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.clientMetadata) { - obj.clientMetadata = message.clientMetadata.map((e) => e ? GenesisMetadata.toJSON(e) : undefined); - } - else { - obj.clientMetadata = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseIdentifiedGenesisMetadata, - }; - message.clientMetadata = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientMetadata !== undefined && object.clientMetadata !== null) { - for (const e of object.clientMetadata) { - message.clientMetadata.push(GenesisMetadata.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts deleted file mode 100644 index 77fef03..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts +++ /dev/null @@ -1,472 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - IdentifiedClientState, - ClientConsensusStates, - Params, -} from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** GenesisState defines the ibc client submodule's genesis state. */ -export interface GenesisState { - /** client states with their corresponding identifiers */ - clients: IdentifiedClientState[]; - /** consensus states from each client */ - clientsConsensus: ClientConsensusStates[]; - /** metadata from each client */ - clientsMetadata: IdentifiedGenesisMetadata[]; - params: Params | undefined; - /** create localhost on initialization */ - createLocalhost: boolean; - /** the sequence for the next generated client identifier */ - nextClientSequence: number; -} - -/** - * GenesisMetadata defines the genesis type for metadata that clients may return - * with ExportMetadata - */ -export interface GenesisMetadata { - /** store key of metadata without clientID-prefix */ - key: Uint8Array; - /** metadata value */ - value: Uint8Array; -} - -/** IdentifiedGenesisMetadata has the client metadata with the corresponding client id. */ -export interface IdentifiedGenesisMetadata { - clientId: string; - clientMetadata: GenesisMetadata[]; -} - -const baseGenesisState: object = { - createLocalhost: false, - nextClientSequence: 0, -}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.clients) { - IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clientsConsensus) { - ClientConsensusStates.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.clientsMetadata) { - IdentifiedGenesisMetadata.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); - } - if (message.createLocalhost === true) { - writer.uint32(40).bool(message.createLocalhost); - } - if (message.nextClientSequence !== 0) { - writer.uint32(48).uint64(message.nextClientSequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.clients = []; - message.clientsConsensus = []; - message.clientsMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clients.push( - IdentifiedClientState.decode(reader, reader.uint32()) - ); - break; - case 2: - message.clientsConsensus.push( - ClientConsensusStates.decode(reader, reader.uint32()) - ); - break; - case 3: - message.clientsMetadata.push( - IdentifiedGenesisMetadata.decode(reader, reader.uint32()) - ); - break; - case 4: - message.params = Params.decode(reader, reader.uint32()); - break; - case 5: - message.createLocalhost = reader.bool(); - break; - case 6: - message.nextClientSequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.clients = []; - message.clientsConsensus = []; - message.clientsMetadata = []; - if (object.clients !== undefined && object.clients !== null) { - for (const e of object.clients) { - message.clients.push(IdentifiedClientState.fromJSON(e)); - } - } - if ( - object.clientsConsensus !== undefined && - object.clientsConsensus !== null - ) { - for (const e of object.clientsConsensus) { - message.clientsConsensus.push(ClientConsensusStates.fromJSON(e)); - } - } - if ( - object.clientsMetadata !== undefined && - object.clientsMetadata !== null - ) { - for (const e of object.clientsMetadata) { - message.clientsMetadata.push(IdentifiedGenesisMetadata.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if ( - object.createLocalhost !== undefined && - object.createLocalhost !== null - ) { - message.createLocalhost = Boolean(object.createLocalhost); - } else { - message.createLocalhost = false; - } - if ( - object.nextClientSequence !== undefined && - object.nextClientSequence !== null - ) { - message.nextClientSequence = Number(object.nextClientSequence); - } else { - message.nextClientSequence = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.clients) { - obj.clients = message.clients.map((e) => - e ? IdentifiedClientState.toJSON(e) : undefined - ); - } else { - obj.clients = []; - } - if (message.clientsConsensus) { - obj.clientsConsensus = message.clientsConsensus.map((e) => - e ? ClientConsensusStates.toJSON(e) : undefined - ); - } else { - obj.clientsConsensus = []; - } - if (message.clientsMetadata) { - obj.clientsMetadata = message.clientsMetadata.map((e) => - e ? IdentifiedGenesisMetadata.toJSON(e) : undefined - ); - } else { - obj.clientsMetadata = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.createLocalhost !== undefined && - (obj.createLocalhost = message.createLocalhost); - message.nextClientSequence !== undefined && - (obj.nextClientSequence = message.nextClientSequence); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.clients = []; - message.clientsConsensus = []; - message.clientsMetadata = []; - if (object.clients !== undefined && object.clients !== null) { - for (const e of object.clients) { - message.clients.push(IdentifiedClientState.fromPartial(e)); - } - } - if ( - object.clientsConsensus !== undefined && - object.clientsConsensus !== null - ) { - for (const e of object.clientsConsensus) { - message.clientsConsensus.push(ClientConsensusStates.fromPartial(e)); - } - } - if ( - object.clientsMetadata !== undefined && - object.clientsMetadata !== null - ) { - for (const e of object.clientsMetadata) { - message.clientsMetadata.push(IdentifiedGenesisMetadata.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if ( - object.createLocalhost !== undefined && - object.createLocalhost !== null - ) { - message.createLocalhost = object.createLocalhost; - } else { - message.createLocalhost = false; - } - if ( - object.nextClientSequence !== undefined && - object.nextClientSequence !== null - ) { - message.nextClientSequence = object.nextClientSequence; - } else { - message.nextClientSequence = 0; - } - return message; - }, -}; - -const baseGenesisMetadata: object = {}; - -export const GenesisMetadata = { - encode(message: GenesisMetadata, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisMetadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisMetadata } as GenesisMetadata; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisMetadata { - const message = { ...baseGenesisMetadata } as GenesisMetadata; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: GenesisMetadata): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisMetadata { - const message = { ...baseGenesisMetadata } as GenesisMetadata; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -const baseIdentifiedGenesisMetadata: object = { clientId: "" }; - -export const IdentifiedGenesisMetadata = { - encode( - message: IdentifiedGenesisMetadata, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.clientMetadata) { - GenesisMetadata.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): IdentifiedGenesisMetadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseIdentifiedGenesisMetadata, - } as IdentifiedGenesisMetadata; - message.clientMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientMetadata.push( - GenesisMetadata.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedGenesisMetadata { - const message = { - ...baseIdentifiedGenesisMetadata, - } as IdentifiedGenesisMetadata; - message.clientMetadata = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientMetadata !== undefined && object.clientMetadata !== null) { - for (const e of object.clientMetadata) { - message.clientMetadata.push(GenesisMetadata.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: IdentifiedGenesisMetadata): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.clientMetadata) { - obj.clientMetadata = message.clientMetadata.map((e) => - e ? GenesisMetadata.toJSON(e) : undefined - ); - } else { - obj.clientMetadata = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedGenesisMetadata { - const message = { - ...baseIdentifiedGenesisMetadata, - } as IdentifiedGenesisMetadata; - message.clientMetadata = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientMetadata !== undefined && object.clientMetadata !== null) { - for (const e of object.clientMetadata) { - message.clientMetadata.push(GenesisMetadata.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.d.ts deleted file mode 100644 index 96bfa21..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.d.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params } from "../../../../ibc/core/client/v1/client"; -import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** - * QueryClientStateRequest is the request type for the Query/ClientState RPC - * method - */ -export interface QueryClientStateRequest { - /** client state unique identifier */ - clientId: string; -} -/** - * QueryClientStateResponse is the response type for the Query/ClientState RPC - * method. Besides the client state, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryClientStateResponse { - /** client state associated with the request identifier */ - clientState: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryClientStatesRequest is the request type for the Query/ClientStates RPC - * method - */ -export interface QueryClientStatesRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} -/** - * QueryClientStatesResponse is the response type for the Query/ClientStates RPC - * method. - */ -export interface QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - clientStates: IdentifiedClientState[]; - /** pagination response */ - pagination: PageResponse | undefined; -} -/** - * QueryConsensusStateRequest is the request type for the Query/ConsensusState - * RPC method. Besides the consensus state, it includes a proof and the height - * from which the proof was retrieved. - */ -export interface QueryConsensusStateRequest { - /** client identifier */ - clientId: string; - /** consensus state revision number */ - revisionNumber: number; - /** consensus state revision height */ - revisionHeight: number; - /** - * latest_height overrrides the height field and queries the latest stored - * ConsensusState - */ - latestHeight: boolean; -} -/** - * QueryConsensusStateResponse is the response type for the Query/ConsensusState - * RPC method - */ -export interface QueryConsensusStateResponse { - /** consensus state associated with the client identifier at the given height */ - consensusState: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates - * RPC method. - */ -export interface QueryConsensusStatesRequest { - /** client identifier */ - clientId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -/** - * QueryConsensusStatesResponse is the response type for the - * Query/ConsensusStates RPC method - */ -export interface QueryConsensusStatesResponse { - /** consensus states associated with the identifier */ - consensusStates: ConsensusStateWithHeight[]; - /** pagination response */ - pagination: PageResponse | undefined; -} -/** QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. */ -export interface QueryClientParamsRequest { -} -/** QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. */ -export interface QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export declare const QueryClientStateRequest: { - encode(message: QueryClientStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientStateRequest; - fromJSON(object: any): QueryClientStateRequest; - toJSON(message: QueryClientStateRequest): unknown; - fromPartial(object: DeepPartial): QueryClientStateRequest; -}; -export declare const QueryClientStateResponse: { - encode(message: QueryClientStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientStateResponse; - fromJSON(object: any): QueryClientStateResponse; - toJSON(message: QueryClientStateResponse): unknown; - fromPartial(object: DeepPartial): QueryClientStateResponse; -}; -export declare const QueryClientStatesRequest: { - encode(message: QueryClientStatesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientStatesRequest; - fromJSON(object: any): QueryClientStatesRequest; - toJSON(message: QueryClientStatesRequest): unknown; - fromPartial(object: DeepPartial): QueryClientStatesRequest; -}; -export declare const QueryClientStatesResponse: { - encode(message: QueryClientStatesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientStatesResponse; - fromJSON(object: any): QueryClientStatesResponse; - toJSON(message: QueryClientStatesResponse): unknown; - fromPartial(object: DeepPartial): QueryClientStatesResponse; -}; -export declare const QueryConsensusStateRequest: { - encode(message: QueryConsensusStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConsensusStateRequest; - fromJSON(object: any): QueryConsensusStateRequest; - toJSON(message: QueryConsensusStateRequest): unknown; - fromPartial(object: DeepPartial): QueryConsensusStateRequest; -}; -export declare const QueryConsensusStateResponse: { - encode(message: QueryConsensusStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConsensusStateResponse; - fromJSON(object: any): QueryConsensusStateResponse; - toJSON(message: QueryConsensusStateResponse): unknown; - fromPartial(object: DeepPartial): QueryConsensusStateResponse; -}; -export declare const QueryConsensusStatesRequest: { - encode(message: QueryConsensusStatesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConsensusStatesRequest; - fromJSON(object: any): QueryConsensusStatesRequest; - toJSON(message: QueryConsensusStatesRequest): unknown; - fromPartial(object: DeepPartial): QueryConsensusStatesRequest; -}; -export declare const QueryConsensusStatesResponse: { - encode(message: QueryConsensusStatesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConsensusStatesResponse; - fromJSON(object: any): QueryConsensusStatesResponse; - toJSON(message: QueryConsensusStatesResponse): unknown; - fromPartial(object: DeepPartial): QueryConsensusStatesResponse; -}; -export declare const QueryClientParamsRequest: { - encode(_: QueryClientParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientParamsRequest; - fromJSON(_: any): QueryClientParamsRequest; - toJSON(_: QueryClientParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryClientParamsRequest; -}; -export declare const QueryClientParamsResponse: { - encode(message: QueryClientParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientParamsResponse; - fromJSON(object: any): QueryClientParamsResponse; - toJSON(message: QueryClientParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryClientParamsResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ClientState queries an IBC light client. */ - ClientState(request: QueryClientStateRequest): Promise; - /** ClientStates queries all the IBC light clients of a chain. */ - ClientStates(request: QueryClientStatesRequest): Promise; - /** - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - ConsensusState(request: QueryConsensusStateRequest): Promise; - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - ConsensusStates(request: QueryConsensusStatesRequest): Promise; - /** ClientParams queries all parameters of the ibc client. */ - ClientParams(request: QueryClientParamsRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - ClientState(request: QueryClientStateRequest): Promise; - ClientStates(request: QueryClientStatesRequest): Promise; - ConsensusState(request: QueryConsensusStateRequest): Promise; - ConsensusStates(request: QueryConsensusStatesRequest): Promise; - ClientParams(request: QueryClientParamsRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.js deleted file mode 100644 index f0977ce..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.js +++ /dev/null @@ -1,861 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../../google/protobuf/any"; -import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params, } from "../../../../ibc/core/client/v1/client"; -import { PageRequest, PageResponse, } from "../../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "ibc.core.client.v1"; -const baseQueryClientStateRequest = { clientId: "" }; -export const QueryClientStateRequest = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientStateRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientStateRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - return message; - }, -}; -const baseQueryClientStateResponse = {}; -export const QueryClientStateResponse = { - encode(message, writer = Writer.create()) { - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientStateResponse, - }; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientStateResponse, - }; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryClientStatesRequest = {}; -export const QueryClientStatesRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientStatesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientStatesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryClientStatesResponse = {}; -export const QueryClientStatesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.clientStates) { - IdentifiedClientState.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatesResponse, - }; - message.clientStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientStates.push(IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientStatesResponse, - }; - message.clientStates = []; - if (object.clientStates !== undefined && object.clientStates !== null) { - for (const e of object.clientStates) { - message.clientStates.push(IdentifiedClientState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.clientStates) { - obj.clientStates = message.clientStates.map((e) => e ? IdentifiedClientState.toJSON(e) : undefined); - } - else { - obj.clientStates = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientStatesResponse, - }; - message.clientStates = []; - if (object.clientStates !== undefined && object.clientStates !== null) { - for (const e of object.clientStates) { - message.clientStates.push(IdentifiedClientState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryConsensusStateRequest = { - clientId: "", - revisionNumber: 0, - revisionHeight: 0, - latestHeight: false, -}; -export const QueryConsensusStateRequest = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.revisionNumber !== 0) { - writer.uint32(16).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(24).uint64(message.revisionHeight); - } - if (message.latestHeight === true) { - writer.uint32(32).bool(message.latestHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 3: - message.revisionHeight = longToNumber(reader.uint64()); - break; - case 4: - message.latestHeight = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConsensusStateRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - if (object.latestHeight !== undefined && object.latestHeight !== null) { - message.latestHeight = Boolean(object.latestHeight); - } - else { - message.latestHeight = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - message.latestHeight !== undefined && - (obj.latestHeight = message.latestHeight); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConsensusStateRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - if (object.latestHeight !== undefined && object.latestHeight !== null) { - message.latestHeight = object.latestHeight; - } - else { - message.latestHeight = false; - } - return message; - }, -}; -const baseQueryConsensusStateResponse = {}; -export const QueryConsensusStateResponse = { - encode(message, writer = Writer.create()) { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConsensusStateResponse, - }; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConsensusStateResponse, - }; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryConsensusStatesRequest = { clientId: "" }; -export const QueryConsensusStatesRequest = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStatesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConsensusStatesRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConsensusStatesRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryConsensusStatesResponse = {}; -export const QueryConsensusStatesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStatesResponse, - }; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConsensusStatesResponse, - }; - message.consensusStates = []; - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } - else { - obj.consensusStates = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConsensusStatesResponse, - }; - message.consensusStates = []; - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryClientParamsRequest = {}; -export const QueryClientParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientParamsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryClientParamsRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryClientParamsRequest, - }; - return message; - }, -}; -const baseQueryClientParamsResponse = {}; -export const QueryClientParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientParamsResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientParamsResponse, - }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientParamsResponse, - }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - ClientState(request) { - const data = QueryClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientState", data); - return promise.then((data) => QueryClientStateResponse.decode(new Reader(data))); - } - ClientStates(request) { - const data = QueryClientStatesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientStates", data); - return promise.then((data) => QueryClientStatesResponse.decode(new Reader(data))); - } - ConsensusState(request) { - const data = QueryConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusState", data); - return promise.then((data) => QueryConsensusStateResponse.decode(new Reader(data))); - } - ConsensusStates(request) { - const data = QueryConsensusStatesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusStates", data); - return promise.then((data) => QueryConsensusStatesResponse.decode(new Reader(data))); - } - ClientParams(request) { - const data = QueryClientParamsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientParams", data); - return promise.then((data) => QueryClientParamsResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts deleted file mode 100644 index 056aad6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts +++ /dev/null @@ -1,1201 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../../google/protobuf/any"; -import { - Height, - IdentifiedClientState, - ConsensusStateWithHeight, - Params, -} from "../../../../ibc/core/client/v1/client"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * QueryClientStateRequest is the request type for the Query/ClientState RPC - * method - */ -export interface QueryClientStateRequest { - /** client state unique identifier */ - clientId: string; -} - -/** - * QueryClientStateResponse is the response type for the Query/ClientState RPC - * method. Besides the client state, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryClientStateResponse { - /** client state associated with the request identifier */ - clientState: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryClientStatesRequest is the request type for the Query/ClientStates RPC - * method - */ -export interface QueryClientStatesRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryClientStatesResponse is the response type for the Query/ClientStates RPC - * method. - */ -export interface QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - clientStates: IdentifiedClientState[]; - /** pagination response */ - pagination: PageResponse | undefined; -} - -/** - * QueryConsensusStateRequest is the request type for the Query/ConsensusState - * RPC method. Besides the consensus state, it includes a proof and the height - * from which the proof was retrieved. - */ -export interface QueryConsensusStateRequest { - /** client identifier */ - clientId: string; - /** consensus state revision number */ - revisionNumber: number; - /** consensus state revision height */ - revisionHeight: number; - /** - * latest_height overrrides the height field and queries the latest stored - * ConsensusState - */ - latestHeight: boolean; -} - -/** - * QueryConsensusStateResponse is the response type for the Query/ConsensusState - * RPC method - */ -export interface QueryConsensusStateResponse { - /** consensus state associated with the client identifier at the given height */ - consensusState: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates - * RPC method. - */ -export interface QueryConsensusStatesRequest { - /** client identifier */ - clientId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryConsensusStatesResponse is the response type for the - * Query/ConsensusStates RPC method - */ -export interface QueryConsensusStatesResponse { - /** consensus states associated with the identifier */ - consensusStates: ConsensusStateWithHeight[]; - /** pagination response */ - pagination: PageResponse | undefined; -} - -/** QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. */ -export interface QueryClientParamsRequest {} - -/** QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. */ -export interface QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -const baseQueryClientStateRequest: object = { clientId: "" }; - -export const QueryClientStateRequest = { - encode( - message: QueryClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStateRequest, - } as QueryClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStateRequest { - const message = { - ...baseQueryClientStateRequest, - } as QueryClientStateRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - return message; - }, - - toJSON(message: QueryClientStateRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStateRequest { - const message = { - ...baseQueryClientStateRequest, - } as QueryClientStateRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - return message; - }, -}; - -const baseQueryClientStateResponse: object = {}; - -export const QueryClientStateResponse = { - encode( - message: QueryClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStateResponse, - } as QueryClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStateResponse { - const message = { - ...baseQueryClientStateResponse, - } as QueryClientStateResponse; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryClientStateResponse): unknown { - const obj: any = {}; - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStateResponse { - const message = { - ...baseQueryClientStateResponse, - } as QueryClientStateResponse; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryClientStatesRequest: object = {}; - -export const QueryClientStatesRequest = { - encode( - message: QueryClientStatesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStatesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatesRequest, - } as QueryClientStatesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStatesRequest { - const message = { - ...baseQueryClientStatesRequest, - } as QueryClientStatesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryClientStatesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStatesRequest { - const message = { - ...baseQueryClientStatesRequest, - } as QueryClientStatesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryClientStatesResponse: object = {}; - -export const QueryClientStatesResponse = { - encode( - message: QueryClientStatesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.clientStates) { - IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStatesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatesResponse, - } as QueryClientStatesResponse; - message.clientStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientStates.push( - IdentifiedClientState.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStatesResponse { - const message = { - ...baseQueryClientStatesResponse, - } as QueryClientStatesResponse; - message.clientStates = []; - if (object.clientStates !== undefined && object.clientStates !== null) { - for (const e of object.clientStates) { - message.clientStates.push(IdentifiedClientState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryClientStatesResponse): unknown { - const obj: any = {}; - if (message.clientStates) { - obj.clientStates = message.clientStates.map((e) => - e ? IdentifiedClientState.toJSON(e) : undefined - ); - } else { - obj.clientStates = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStatesResponse { - const message = { - ...baseQueryClientStatesResponse, - } as QueryClientStatesResponse; - message.clientStates = []; - if (object.clientStates !== undefined && object.clientStates !== null) { - for (const e of object.clientStates) { - message.clientStates.push(IdentifiedClientState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConsensusStateRequest: object = { - clientId: "", - revisionNumber: 0, - revisionHeight: 0, - latestHeight: false, -}; - -export const QueryConsensusStateRequest = { - encode( - message: QueryConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.revisionNumber !== 0) { - writer.uint32(16).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(24).uint64(message.revisionHeight); - } - if (message.latestHeight === true) { - writer.uint32(32).bool(message.latestHeight); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStateRequest, - } as QueryConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 3: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - case 4: - message.latestHeight = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStateRequest { - const message = { - ...baseQueryConsensusStateRequest, - } as QueryConsensusStateRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - if (object.latestHeight !== undefined && object.latestHeight !== null) { - message.latestHeight = Boolean(object.latestHeight); - } else { - message.latestHeight = false; - } - return message; - }, - - toJSON(message: QueryConsensusStateRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - message.latestHeight !== undefined && - (obj.latestHeight = message.latestHeight); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStateRequest { - const message = { - ...baseQueryConsensusStateRequest, - } as QueryConsensusStateRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - if (object.latestHeight !== undefined && object.latestHeight !== null) { - message.latestHeight = object.latestHeight; - } else { - message.latestHeight = false; - } - return message; - }, -}; - -const baseQueryConsensusStateResponse: object = {}; - -export const QueryConsensusStateResponse = { - encode( - message: QueryConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStateResponse, - } as QueryConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStateResponse { - const message = { - ...baseQueryConsensusStateResponse, - } as QueryConsensusStateResponse; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryConsensusStateResponse): unknown { - const obj: any = {}; - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStateResponse { - const message = { - ...baseQueryConsensusStateResponse, - } as QueryConsensusStateResponse; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryConsensusStatesRequest: object = { clientId: "" }; - -export const QueryConsensusStatesRequest = { - encode( - message: QueryConsensusStatesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStatesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStatesRequest, - } as QueryConsensusStatesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStatesRequest { - const message = { - ...baseQueryConsensusStatesRequest, - } as QueryConsensusStatesRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConsensusStatesRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStatesRequest { - const message = { - ...baseQueryConsensusStatesRequest, - } as QueryConsensusStatesRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConsensusStatesResponse: object = {}; - -export const QueryConsensusStatesResponse = { - encode( - message: QueryConsensusStatesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStatesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStatesResponse, - } as QueryConsensusStatesResponse; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusStates.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStatesResponse { - const message = { - ...baseQueryConsensusStatesResponse, - } as QueryConsensusStatesResponse; - message.consensusStates = []; - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConsensusStatesResponse): unknown { - const obj: any = {}; - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensusStates = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStatesResponse { - const message = { - ...baseQueryConsensusStatesResponse, - } as QueryConsensusStatesResponse; - message.consensusStates = []; - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryClientParamsRequest: object = {}; - -export const QueryClientParamsRequest = { - encode( - _: QueryClientParamsRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientParamsRequest, - } as QueryClientParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryClientParamsRequest { - const message = { - ...baseQueryClientParamsRequest, - } as QueryClientParamsRequest; - return message; - }, - - toJSON(_: QueryClientParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryClientParamsRequest { - const message = { - ...baseQueryClientParamsRequest, - } as QueryClientParamsRequest; - return message; - }, -}; - -const baseQueryClientParamsResponse: object = {}; - -export const QueryClientParamsResponse = { - encode( - message: QueryClientParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientParamsResponse, - } as QueryClientParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientParamsResponse { - const message = { - ...baseQueryClientParamsResponse, - } as QueryClientParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryClientParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientParamsResponse { - const message = { - ...baseQueryClientParamsResponse, - } as QueryClientParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ClientState queries an IBC light client. */ - ClientState( - request: QueryClientStateRequest - ): Promise; - /** ClientStates queries all the IBC light clients of a chain. */ - ClientStates( - request: QueryClientStatesRequest - ): Promise; - /** - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - ConsensusState( - request: QueryConsensusStateRequest - ): Promise; - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - ConsensusStates( - request: QueryConsensusStatesRequest - ): Promise; - /** ClientParams queries all parameters of the ibc client. */ - ClientParams( - request: QueryClientParamsRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ClientState( - request: QueryClientStateRequest - ): Promise { - const data = QueryClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientState", - data - ); - return promise.then((data) => - QueryClientStateResponse.decode(new Reader(data)) - ); - } - - ClientStates( - request: QueryClientStatesRequest - ): Promise { - const data = QueryClientStatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientStates", - data - ); - return promise.then((data) => - QueryClientStatesResponse.decode(new Reader(data)) - ); - } - - ConsensusState( - request: QueryConsensusStateRequest - ): Promise { - const data = QueryConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ConsensusState", - data - ); - return promise.then((data) => - QueryConsensusStateResponse.decode(new Reader(data)) - ); - } - - ConsensusStates( - request: QueryConsensusStatesRequest - ): Promise { - const data = QueryConsensusStatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ConsensusStates", - data - ); - return promise.then((data) => - QueryConsensusStatesResponse.decode(new Reader(data)) - ); - } - - ClientParams( - request: QueryClientParamsRequest - ): Promise { - const data = QueryClientParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientParams", - data - ); - return promise.then((data) => - QueryClientParamsResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.d.ts deleted file mode 100644 index 29eccf2..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** MsgCreateClient defines a message to create an IBC client */ -export interface MsgCreateClient { - /** light client state */ - clientState: Any | undefined; - /** - * consensus state associated with the client that corresponds to a given - * height. - */ - consensusState: Any | undefined; - /** signer address */ - signer: string; -} -/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponse { -} -/** - * MsgUpdateClient defines an sdk.Msg to update a IBC client state using - * the given header. - */ -export interface MsgUpdateClient { - /** client unique identifier */ - clientId: string; - /** header to update the light client */ - header: Any | undefined; - /** signer address */ - signer: string; -} -/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponse { -} -/** MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state */ -export interface MsgUpgradeClient { - /** client unique identifier */ - clientId: string; - /** upgraded client state */ - clientState: Any | undefined; - /** upgraded consensus state, only contains enough information to serve as a basis of trust in update logic */ - consensusState: Any | undefined; - /** proof that old chain committed to new client */ - proofUpgradeClient: Uint8Array; - /** proof that old chain committed to new consensus state */ - proofUpgradeConsensusState: Uint8Array; - /** signer address */ - signer: string; -} -/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ -export interface MsgUpgradeClientResponse { -} -/** - * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for - * light client misbehaviour. - */ -export interface MsgSubmitMisbehaviour { - /** client unique identifier */ - clientId: string; - /** misbehaviour used for freezing the light client */ - misbehaviour: Any | undefined; - /** signer address */ - signer: string; -} -/** MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. */ -export interface MsgSubmitMisbehaviourResponse { -} -export declare const MsgCreateClient: { - encode(message: MsgCreateClient, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateClient; - fromJSON(object: any): MsgCreateClient; - toJSON(message: MsgCreateClient): unknown; - fromPartial(object: DeepPartial): MsgCreateClient; -}; -export declare const MsgCreateClientResponse: { - encode(_: MsgCreateClientResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateClientResponse; - fromJSON(_: any): MsgCreateClientResponse; - toJSON(_: MsgCreateClientResponse): unknown; - fromPartial(_: DeepPartial): MsgCreateClientResponse; -}; -export declare const MsgUpdateClient: { - encode(message: MsgUpdateClient, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUpdateClient; - fromJSON(object: any): MsgUpdateClient; - toJSON(message: MsgUpdateClient): unknown; - fromPartial(object: DeepPartial): MsgUpdateClient; -}; -export declare const MsgUpdateClientResponse: { - encode(_: MsgUpdateClientResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUpdateClientResponse; - fromJSON(_: any): MsgUpdateClientResponse; - toJSON(_: MsgUpdateClientResponse): unknown; - fromPartial(_: DeepPartial): MsgUpdateClientResponse; -}; -export declare const MsgUpgradeClient: { - encode(message: MsgUpgradeClient, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUpgradeClient; - fromJSON(object: any): MsgUpgradeClient; - toJSON(message: MsgUpgradeClient): unknown; - fromPartial(object: DeepPartial): MsgUpgradeClient; -}; -export declare const MsgUpgradeClientResponse: { - encode(_: MsgUpgradeClientResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUpgradeClientResponse; - fromJSON(_: any): MsgUpgradeClientResponse; - toJSON(_: MsgUpgradeClientResponse): unknown; - fromPartial(_: DeepPartial): MsgUpgradeClientResponse; -}; -export declare const MsgSubmitMisbehaviour: { - encode(message: MsgSubmitMisbehaviour, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitMisbehaviour; - fromJSON(object: any): MsgSubmitMisbehaviour; - toJSON(message: MsgSubmitMisbehaviour): unknown; - fromPartial(object: DeepPartial): MsgSubmitMisbehaviour; -}; -export declare const MsgSubmitMisbehaviourResponse: { - encode(_: MsgSubmitMisbehaviourResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitMisbehaviourResponse; - fromJSON(_: any): MsgSubmitMisbehaviourResponse; - toJSON(_: MsgSubmitMisbehaviourResponse): unknown; - fromPartial(_: DeepPartial): MsgSubmitMisbehaviourResponse; -}; -/** Msg defines the ibc/client Msg service. */ -export interface Msg { - /** CreateClient defines a rpc handler method for MsgCreateClient. */ - CreateClient(request: MsgCreateClient): Promise; - /** UpdateClient defines a rpc handler method for MsgUpdateClient. */ - UpdateClient(request: MsgUpdateClient): Promise; - /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ - UpgradeClient(request: MsgUpgradeClient): Promise; - /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ - SubmitMisbehaviour(request: MsgSubmitMisbehaviour): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - CreateClient(request: MsgCreateClient): Promise; - UpdateClient(request: MsgUpdateClient): Promise; - UpgradeClient(request: MsgUpgradeClient): Promise; - SubmitMisbehaviour(request: MsgSubmitMisbehaviour): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.js deleted file mode 100644 index d24fd68..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.js +++ /dev/null @@ -1,644 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.client.v1"; -const baseMsgCreateClient = { signer: "" }; -export const MsgCreateClient = { - encode(message, writer = Writer.create()) { - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateClient }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgCreateClient }; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgCreateClient }; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgCreateClientResponse = {}; -export const MsgCreateClientResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateClientResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgCreateClientResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgCreateClientResponse, - }; - return message; - }, -}; -const baseMsgUpdateClient = { clientId: "", signer: "" }; -export const MsgUpdateClient = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateClient }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.header = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUpdateClient }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUpdateClient }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgUpdateClientResponse = {}; -export const MsgUpdateClientResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgUpdateClientResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgUpdateClientResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgUpdateClientResponse, - }; - return message; - }, -}; -const baseMsgUpgradeClient = { clientId: "", signer: "" }; -export const MsgUpgradeClient = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); - } - if (message.proofUpgradeClient.length !== 0) { - writer.uint32(34).bytes(message.proofUpgradeClient); - } - if (message.proofUpgradeConsensusState.length !== 0) { - writer.uint32(42).bytes(message.proofUpgradeConsensusState); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpgradeClient }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.proofUpgradeClient = reader.bytes(); - break; - case 5: - message.proofUpgradeConsensusState = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUpgradeClient }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.proofUpgradeClient !== undefined && - object.proofUpgradeClient !== null) { - message.proofUpgradeClient = bytesFromBase64(object.proofUpgradeClient); - } - if (object.proofUpgradeConsensusState !== undefined && - object.proofUpgradeConsensusState !== null) { - message.proofUpgradeConsensusState = bytesFromBase64(object.proofUpgradeConsensusState); - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.proofUpgradeClient !== undefined && - (obj.proofUpgradeClient = base64FromBytes(message.proofUpgradeClient !== undefined - ? message.proofUpgradeClient - : new Uint8Array())); - message.proofUpgradeConsensusState !== undefined && - (obj.proofUpgradeConsensusState = base64FromBytes(message.proofUpgradeConsensusState !== undefined - ? message.proofUpgradeConsensusState - : new Uint8Array())); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUpgradeClient }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.proofUpgradeClient !== undefined && - object.proofUpgradeClient !== null) { - message.proofUpgradeClient = object.proofUpgradeClient; - } - else { - message.proofUpgradeClient = new Uint8Array(); - } - if (object.proofUpgradeConsensusState !== undefined && - object.proofUpgradeConsensusState !== null) { - message.proofUpgradeConsensusState = object.proofUpgradeConsensusState; - } - else { - message.proofUpgradeConsensusState = new Uint8Array(); - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgUpgradeClientResponse = {}; -export const MsgUpgradeClientResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgUpgradeClientResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgUpgradeClientResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgUpgradeClientResponse, - }; - return message; - }, -}; -const baseMsgSubmitMisbehaviour = { clientId: "", signer: "" }; -export const MsgSubmitMisbehaviour = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.misbehaviour !== undefined) { - Any.encode(message.misbehaviour, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitMisbehaviour }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.misbehaviour = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSubmitMisbehaviour }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.misbehaviour !== undefined && object.misbehaviour !== null) { - message.misbehaviour = Any.fromJSON(object.misbehaviour); - } - else { - message.misbehaviour = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.misbehaviour !== undefined && - (obj.misbehaviour = message.misbehaviour - ? Any.toJSON(message.misbehaviour) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSubmitMisbehaviour }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.misbehaviour !== undefined && object.misbehaviour !== null) { - message.misbehaviour = Any.fromPartial(object.misbehaviour); - } - else { - message.misbehaviour = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgSubmitMisbehaviourResponse = {}; -export const MsgSubmitMisbehaviourResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitMisbehaviourResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgSubmitMisbehaviourResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgSubmitMisbehaviourResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - CreateClient(request) { - const data = MsgCreateClient.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "CreateClient", data); - return promise.then((data) => MsgCreateClientResponse.decode(new Reader(data))); - } - UpdateClient(request) { - const data = MsgUpdateClient.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "UpdateClient", data); - return promise.then((data) => MsgUpdateClientResponse.decode(new Reader(data))); - } - UpgradeClient(request) { - const data = MsgUpgradeClient.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "UpgradeClient", data); - return promise.then((data) => MsgUpgradeClientResponse.decode(new Reader(data))); - } - SubmitMisbehaviour(request) { - const data = MsgSubmitMisbehaviour.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "SubmitMisbehaviour", data); - return promise.then((data) => MsgSubmitMisbehaviourResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts deleted file mode 100644 index 02228b5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts +++ /dev/null @@ -1,838 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** MsgCreateClient defines a message to create an IBC client */ -export interface MsgCreateClient { - /** light client state */ - clientState: Any | undefined; - /** - * consensus state associated with the client that corresponds to a given - * height. - */ - consensusState: Any | undefined; - /** signer address */ - signer: string; -} - -/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponse {} - -/** - * MsgUpdateClient defines an sdk.Msg to update a IBC client state using - * the given header. - */ -export interface MsgUpdateClient { - /** client unique identifier */ - clientId: string; - /** header to update the light client */ - header: Any | undefined; - /** signer address */ - signer: string; -} - -/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponse {} - -/** MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state */ -export interface MsgUpgradeClient { - /** client unique identifier */ - clientId: string; - /** upgraded client state */ - clientState: Any | undefined; - /** upgraded consensus state, only contains enough information to serve as a basis of trust in update logic */ - consensusState: Any | undefined; - /** proof that old chain committed to new client */ - proofUpgradeClient: Uint8Array; - /** proof that old chain committed to new consensus state */ - proofUpgradeConsensusState: Uint8Array; - /** signer address */ - signer: string; -} - -/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ -export interface MsgUpgradeClientResponse {} - -/** - * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for - * light client misbehaviour. - */ -export interface MsgSubmitMisbehaviour { - /** client unique identifier */ - clientId: string; - /** misbehaviour used for freezing the light client */ - misbehaviour: Any | undefined; - /** signer address */ - signer: string; -} - -/** MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. */ -export interface MsgSubmitMisbehaviourResponse {} - -const baseMsgCreateClient: object = { signer: "" }; - -export const MsgCreateClient = { - encode(message: MsgCreateClient, writer: Writer = Writer.create()): Writer { - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateClient { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateClient } as MsgCreateClient; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateClient { - const message = { ...baseMsgCreateClient } as MsgCreateClient; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgCreateClient): unknown { - const obj: any = {}; - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgCreateClient { - const message = { ...baseMsgCreateClient } as MsgCreateClient; - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgCreateClientResponse: object = {}; - -export const MsgCreateClientResponse = { - encode(_: MsgCreateClientResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateClientResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateClientResponse, - } as MsgCreateClientResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreateClientResponse { - const message = { - ...baseMsgCreateClientResponse, - } as MsgCreateClientResponse; - return message; - }, - - toJSON(_: MsgCreateClientResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCreateClientResponse { - const message = { - ...baseMsgCreateClientResponse, - } as MsgCreateClientResponse; - return message; - }, -}; - -const baseMsgUpdateClient: object = { clientId: "", signer: "" }; - -export const MsgUpdateClient = { - encode(message: MsgUpdateClient, writer: Writer = Writer.create()): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpdateClient { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateClient } as MsgUpdateClient; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.header = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUpdateClient { - const message = { ...baseMsgUpdateClient } as MsgUpdateClient; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgUpdateClient): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUpdateClient { - const message = { ...baseMsgUpdateClient } as MsgUpdateClient; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgUpdateClientResponse: object = {}; - -export const MsgUpdateClientResponse = { - encode(_: MsgUpdateClientResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpdateClientResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgUpdateClientResponse, - } as MsgUpdateClientResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUpdateClientResponse { - const message = { - ...baseMsgUpdateClientResponse, - } as MsgUpdateClientResponse; - return message; - }, - - toJSON(_: MsgUpdateClientResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgUpdateClientResponse { - const message = { - ...baseMsgUpdateClientResponse, - } as MsgUpdateClientResponse; - return message; - }, -}; - -const baseMsgUpgradeClient: object = { clientId: "", signer: "" }; - -export const MsgUpgradeClient = { - encode(message: MsgUpgradeClient, writer: Writer = Writer.create()): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); - } - if (message.proofUpgradeClient.length !== 0) { - writer.uint32(34).bytes(message.proofUpgradeClient); - } - if (message.proofUpgradeConsensusState.length !== 0) { - writer.uint32(42).bytes(message.proofUpgradeConsensusState); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpgradeClient { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpgradeClient } as MsgUpgradeClient; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.proofUpgradeClient = reader.bytes(); - break; - case 5: - message.proofUpgradeConsensusState = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUpgradeClient { - const message = { ...baseMsgUpgradeClient } as MsgUpgradeClient; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - if ( - object.proofUpgradeClient !== undefined && - object.proofUpgradeClient !== null - ) { - message.proofUpgradeClient = bytesFromBase64(object.proofUpgradeClient); - } - if ( - object.proofUpgradeConsensusState !== undefined && - object.proofUpgradeConsensusState !== null - ) { - message.proofUpgradeConsensusState = bytesFromBase64( - object.proofUpgradeConsensusState - ); - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgUpgradeClient): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.proofUpgradeClient !== undefined && - (obj.proofUpgradeClient = base64FromBytes( - message.proofUpgradeClient !== undefined - ? message.proofUpgradeClient - : new Uint8Array() - )); - message.proofUpgradeConsensusState !== undefined && - (obj.proofUpgradeConsensusState = base64FromBytes( - message.proofUpgradeConsensusState !== undefined - ? message.proofUpgradeConsensusState - : new Uint8Array() - )); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUpgradeClient { - const message = { ...baseMsgUpgradeClient } as MsgUpgradeClient; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - if ( - object.proofUpgradeClient !== undefined && - object.proofUpgradeClient !== null - ) { - message.proofUpgradeClient = object.proofUpgradeClient; - } else { - message.proofUpgradeClient = new Uint8Array(); - } - if ( - object.proofUpgradeConsensusState !== undefined && - object.proofUpgradeConsensusState !== null - ) { - message.proofUpgradeConsensusState = object.proofUpgradeConsensusState; - } else { - message.proofUpgradeConsensusState = new Uint8Array(); - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgUpgradeClientResponse: object = {}; - -export const MsgUpgradeClientResponse = { - encode( - _: MsgUpgradeClientResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgUpgradeClientResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgUpgradeClientResponse, - } as MsgUpgradeClientResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUpgradeClientResponse { - const message = { - ...baseMsgUpgradeClientResponse, - } as MsgUpgradeClientResponse; - return message; - }, - - toJSON(_: MsgUpgradeClientResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgUpgradeClientResponse { - const message = { - ...baseMsgUpgradeClientResponse, - } as MsgUpgradeClientResponse; - return message; - }, -}; - -const baseMsgSubmitMisbehaviour: object = { clientId: "", signer: "" }; - -export const MsgSubmitMisbehaviour = { - encode( - message: MsgSubmitMisbehaviour, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.misbehaviour !== undefined) { - Any.encode(message.misbehaviour, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSubmitMisbehaviour { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitMisbehaviour } as MsgSubmitMisbehaviour; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.misbehaviour = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitMisbehaviour { - const message = { ...baseMsgSubmitMisbehaviour } as MsgSubmitMisbehaviour; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.misbehaviour !== undefined && object.misbehaviour !== null) { - message.misbehaviour = Any.fromJSON(object.misbehaviour); - } else { - message.misbehaviour = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgSubmitMisbehaviour): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.misbehaviour !== undefined && - (obj.misbehaviour = message.misbehaviour - ? Any.toJSON(message.misbehaviour) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSubmitMisbehaviour { - const message = { ...baseMsgSubmitMisbehaviour } as MsgSubmitMisbehaviour; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.misbehaviour !== undefined && object.misbehaviour !== null) { - message.misbehaviour = Any.fromPartial(object.misbehaviour); - } else { - message.misbehaviour = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgSubmitMisbehaviourResponse: object = {}; - -export const MsgSubmitMisbehaviourResponse = { - encode( - _: MsgSubmitMisbehaviourResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSubmitMisbehaviourResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitMisbehaviourResponse, - } as MsgSubmitMisbehaviourResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgSubmitMisbehaviourResponse { - const message = { - ...baseMsgSubmitMisbehaviourResponse, - } as MsgSubmitMisbehaviourResponse; - return message; - }, - - toJSON(_: MsgSubmitMisbehaviourResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgSubmitMisbehaviourResponse { - const message = { - ...baseMsgSubmitMisbehaviourResponse, - } as MsgSubmitMisbehaviourResponse; - return message; - }, -}; - -/** Msg defines the ibc/client Msg service. */ -export interface Msg { - /** CreateClient defines a rpc handler method for MsgCreateClient. */ - CreateClient(request: MsgCreateClient): Promise; - /** UpdateClient defines a rpc handler method for MsgUpdateClient. */ - UpdateClient(request: MsgUpdateClient): Promise; - /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ - UpgradeClient(request: MsgUpgradeClient): Promise; - /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ - SubmitMisbehaviour( - request: MsgSubmitMisbehaviour - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateClient(request: MsgCreateClient): Promise { - const data = MsgCreateClient.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "CreateClient", - data - ); - return promise.then((data) => - MsgCreateClientResponse.decode(new Reader(data)) - ); - } - - UpdateClient(request: MsgUpdateClient): Promise { - const data = MsgUpdateClient.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "UpdateClient", - data - ); - return promise.then((data) => - MsgUpdateClientResponse.decode(new Reader(data)) - ); - } - - UpgradeClient(request: MsgUpgradeClient): Promise { - const data = MsgUpgradeClient.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "UpgradeClient", - data - ); - return promise.then((data) => - MsgUpgradeClientResponse.decode(new Reader(data)) - ); - } - - SubmitMisbehaviour( - request: MsgSubmitMisbehaviour - ): Promise { - const data = MsgSubmitMisbehaviour.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "SubmitMisbehaviour", - data - ); - return promise.then((data) => - MsgSubmitMisbehaviourResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.client.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.d.ts deleted file mode 100644 index e89f937..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.js deleted file mode 100644 index e7c638b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.js +++ /dev/null @@ -1,319 +0,0 @@ -import { txClient, queryClient } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { ConnectionEnd } from "./module/types/ibc/core/connection/v1/connection"; -import { IdentifiedConnection } from "./module/types/ibc/core/connection/v1/connection"; -import { Counterparty } from "./module/types/ibc/core/connection/v1/connection"; -import { ClientPaths } from "./module/types/ibc/core/connection/v1/connection"; -import { ConnectionPaths } from "./module/types/ibc/core/connection/v1/connection"; -import { Version } from "./module/types/ibc/core/connection/v1/connection"; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Connection: {}, - Connections: {}, - ClientConnections: {}, - ConnectionClientState: {}, - ConnectionConsensusState: {}, - _Structure: { - ConnectionEnd: getStructure(ConnectionEnd.fromPartial({})), - IdentifiedConnection: getStructure(IdentifiedConnection.fromPartial({})), - Counterparty: getStructure(Counterparty.fromPartial({})), - ClientPaths: getStructure(ClientPaths.fromPartial({})), - ConnectionPaths: getStructure(ConnectionPaths.fromPartial({})), - Version: getStructure(Version.fromPartial({})), - }, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription); - } - }, - getters: { - getConnection: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Connection[JSON.stringify(params)] ?? {}; - }, - getConnections: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.Connections[JSON.stringify(params)] ?? {}; - }, - getClientConnections: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ClientConnections[JSON.stringify(params)] ?? {}; - }, - getConnectionClientState: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ConnectionClientState[JSON.stringify(params)] ?? {}; - }, - getConnectionConsensusState: (state) => (params = {}) => { - if (!params.query) { - params.query = null; - } - return state.ConnectionConsensusState[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload); - }); - }, - async QueryConnection({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConnection(key.connection_id, query)).data : (await (await initQueryClient(rootGetters)).queryConnection(key.connection_id)).data; - commit('QUERY', { query: 'Connection', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConnection', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConnection']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnection', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryConnections({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConnections(query)).data : (await (await initQueryClient(rootGetters)).queryConnections()).data; - while (all && value.pagination && value.pagination.nextKey != null) { - let next_values = (await (await initQueryClient(rootGetters)).queryConnections({ ...query, 'pagination.key': value.pagination.nextKey })).data; - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - } - commit('QUERY', { query: 'Connections', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConnections', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConnections']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnections', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryClientConnections({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryClientConnections(key.client_id, query)).data : (await (await initQueryClient(rootGetters)).queryClientConnections(key.client_id)).data; - commit('QUERY', { query: 'ClientConnections', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryClientConnections', payload: { options: { all }, params: { ...key }, query } }); - return getters['getClientConnections']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientConnections', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryConnectionClientState({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConnectionClientState(key.connection_id, query)).data : (await (await initQueryClient(rootGetters)).queryConnectionClientState(key.connection_id)).data; - commit('QUERY', { query: 'ConnectionClientState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConnectionClientState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConnectionClientState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnectionClientState', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async QueryConnectionConsensusState({ commit, rootGetters, getters }, { options: { subscribe = false, all = false }, params: { ...key }, query = null }) { - try { - let value = query ? (await (await initQueryClient(rootGetters)).queryConnectionConsensusState(key.connection_id, key.revision_number, key.revision_height, query)).data : (await (await initQueryClient(rootGetters)).queryConnectionConsensusState(key.connection_id, key.revision_number, key.revision_height)).data; - commit('QUERY', { query: 'ConnectionConsensusState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryConnectionConsensusState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getConnectionConsensusState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnectionConsensusState', 'API Node Unavailable. Could not perform query.')); - return {}; - } - }, - async sendMsgConnectionOpenAck({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenAck(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgConnectionOpenConfirm({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenConfirm(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgConnectionOpenInit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenInit(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Send', 'Could not broadcast Tx.'); - } - } - }, - async sendMsgConnectionOpenTry({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenTry(value); - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Send', 'Could not broadcast Tx.'); - } - } - }, - async MsgConnectionOpenAck({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenAck(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Create', 'Could not create message.'); - } - } - }, - async MsgConnectionOpenConfirm({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenConfirm(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Create', 'Could not create message.'); - } - } - }, - async MsgConnectionOpenInit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenInit(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Create', 'Could not create message.'); - } - } - }, - async MsgConnectionOpenTry({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenTry(value); - return msg; - } - catch (e) { - if (e.toString() == 'wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Create', 'Could not create message.'); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.ts deleted file mode 100644 index 010f1ac..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/index.ts +++ /dev/null @@ -1,317 +0,0 @@ -import { txClient, queryClient } from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { ConnectionEnd } from "./module/types/ibc/core/connection/v1/connection" -import { IdentifiedConnection } from "./module/types/ibc/core/connection/v1/connection" -import { Counterparty } from "./module/types/ibc/core/connection/v1/connection" -import { ClientPaths } from "./module/types/ibc/core/connection/v1/connection" -import { ConnectionPaths } from "./module/types/ibc/core/connection/v1/connection" -import { Version } from "./module/types/ibc/core/connection/v1/connection" - - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Connection: {}, - Connections: {}, - ClientConnections: {}, - ConnectionClientState: {}, - ConnectionConsensusState: {}, - - _Structure: { - ConnectionEnd: getStructure(ConnectionEnd.fromPartial({})), - IdentifiedConnection: getStructure(IdentifiedConnection.fromPartial({})), - Counterparty: getStructure(Counterparty.fromPartial({})), - ClientPaths: getStructure(ClientPaths.fromPartial({})), - ConnectionPaths: getStructure(ConnectionPaths.fromPartial({})), - Version: getStructure(Version.fromPartial({})), - - }, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(subscription) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(subscription) - } - }, - getters: { - getConnection: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Connection[JSON.stringify(params)] ?? {} - }, - getConnections: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.Connections[JSON.stringify(params)] ?? {} - }, - getClientConnections: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientConnections[JSON.stringify(params)] ?? {} - }, - getConnectionClientState: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConnectionClientState[JSON.stringify(params)] ?? {} - }, - getConnectionConsensusState: (state) => (params = {}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConnectionConsensusState[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('init') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach((subscription) => { - dispatch(subscription.action, subscription.payload) - }) - }, - async QueryConnection({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConnection( key.connection_id, query)).data:(await (await initQueryClient(rootGetters)).queryConnection( key.connection_id )).data - - commit('QUERY', { query: 'Connection', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnection', payload: { options: { all }, params: {...key},query }}) - return getters['getConnection']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnection', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryConnections({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConnections( query)).data:(await (await initQueryClient(rootGetters)).queryConnections()).data - - while (all && ( value).pagination && ( value).pagination.nextKey!=null) { - let next_values=(await (await initQueryClient(rootGetters)).queryConnections({...query, 'pagination.key':( value).pagination.nextKey})).data - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - } - - commit('QUERY', { query: 'Connections', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnections', payload: { options: { all }, params: {...key},query }}) - return getters['getConnections']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnections', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryClientConnections({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryClientConnections( key.client_id, query)).data:(await (await initQueryClient(rootGetters)).queryClientConnections( key.client_id )).data - - commit('QUERY', { query: 'ClientConnections', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientConnections', payload: { options: { all }, params: {...key},query }}) - return getters['getClientConnections']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryClientConnections', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryConnectionClientState({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConnectionClientState( key.connection_id, query)).data:(await (await initQueryClient(rootGetters)).queryConnectionClientState( key.connection_id )).data - - commit('QUERY', { query: 'ConnectionClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnectionClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getConnectionClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnectionClientState', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - async QueryConnectionConsensusState({ commit, rootGetters, getters }, { options: { subscribe = false , all = false}, params: {...key}, query=null }) { - try { - - let value = query?(await (await initQueryClient(rootGetters)).queryConnectionConsensusState( key.connection_id, key.revision_number, key.revision_height, query)).data:(await (await initQueryClient(rootGetters)).queryConnectionConsensusState( key.connection_id , key.revision_number , key.revision_height )).data - - commit('QUERY', { query: 'ConnectionConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnectionConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getConnectionConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - console.error(new SpVuexError('QueryClient:QueryConnectionConsensusState', 'API Node Unavailable. Could not perform query.')) - return {} - } - }, - - async sendMsgConnectionOpenAck({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenAck(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgConnectionOpenConfirm({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenConfirm(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgConnectionOpenInit({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenInit(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Send', 'Could not broadcast Tx.') - } - } - }, - async sendMsgConnectionOpenTry({ rootGetters }, { value, fee, memo }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenTry(value) - const result = await (await initTxClient(rootGetters)).signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Send', 'Could not broadcast Tx.') - } - } - }, - - async MsgConnectionOpenAck({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenAck(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenAck:Create', 'Could not create message.') - } - } - }, - async MsgConnectionOpenConfirm({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenConfirm(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenConfirm:Create', 'Could not create message.') - } - } - }, - async MsgConnectionOpenInit({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenInit(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenInit:Create', 'Could not create message.') - } - } - }, - async MsgConnectionOpenTry({ rootGetters }, { value }) { - try { - const msg = await (await initTxClient(rootGetters)).msgConnectionOpenTry(value) - return msg - } catch (e) { - if (e.toString()=='wallet is required') { - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgConnectionOpenTry:Create', 'Could not create message.') - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.d.ts deleted file mode 100644 index 02e4632..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgConnectionOpenAck } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenConfirm } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenInit } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenTry } from "./types/ibc/core/connection/v1/tx"; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions) => Promise; - msgConnectionOpenAck: (data: MsgConnectionOpenAck) => EncodeObject; - msgConnectionOpenConfirm: (data: MsgConnectionOpenConfirm) => EncodeObject; - msgConnectionOpenInit: (data: MsgConnectionOpenInit) => EncodeObject; - msgConnectionOpenTry: (data: MsgConnectionOpenTry) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.js deleted file mode 100644 index df0d2bd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.js +++ /dev/null @@ -1,36 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgConnectionOpenAck } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenConfirm } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenInit } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenTry } from "./types/ibc/core/connection/v1/tx"; -const types = [ - ["/ibc.core.connection.v1.MsgConnectionOpenAck", MsgConnectionOpenAck], - ["/ibc.core.connection.v1.MsgConnectionOpenConfirm", MsgConnectionOpenConfirm], - ["/ibc.core.connection.v1.MsgConnectionOpenInit", MsgConnectionOpenInit], - ["/ibc.core.connection.v1.MsgConnectionOpenTry", MsgConnectionOpenTry], -]; -const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw new Error("wallet is required"); - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee = defaultFee, memo = null }) => memo ? client.signAndBroadcast(address, msgs, fee, memo) : client.signAndBroadcast(address, msgs, fee), - msgConnectionOpenAck: (data) => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", value: data }), - msgConnectionOpenConfirm: (data) => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", value: data }), - msgConnectionOpenInit: (data) => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", value: data }), - msgConnectionOpenTry: (data) => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", value: data }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.ts deleted file mode 100644 index 5e3f462..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgConnectionOpenAck } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenConfirm } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenInit } from "./types/ibc/core/connection/v1/tx"; -import { MsgConnectionOpenTry } from "./types/ibc/core/connection/v1/tx"; - - -const types = [ - ["/ibc.core.connection.v1.MsgConnectionOpenAck", MsgConnectionOpenAck], - ["/ibc.core.connection.v1.MsgConnectionOpenConfirm", MsgConnectionOpenConfirm], - ["/ibc.core.connection.v1.MsgConnectionOpenInit", MsgConnectionOpenInit], - ["/ibc.core.connection.v1.MsgConnectionOpenTry", MsgConnectionOpenTry], - -]; - -const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw new Error("wallet is required"); - - const client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee=defaultFee, memo=null }: SignAndBroadcastOptions) => memo?client.signAndBroadcast(address, msgs, fee,memo):client.signAndBroadcast(address, msgs, fee), - msgConnectionOpenAck: (data: MsgConnectionOpenAck): EncodeObject => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", value: data }), - msgConnectionOpenConfirm: (data: MsgConnectionOpenConfirm): EncodeObject => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", value: data }), - msgConnectionOpenInit: (data: MsgConnectionOpenInit): EncodeObject => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", value: data }), - msgConnectionOpenTry: (data: MsgConnectionOpenTry): EncodeObject => ({ typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", value: data }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.d.ts deleted file mode 100644 index cc7eeb8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.d.ts +++ /dev/null @@ -1,671 +0,0 @@ -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* ConnectionEnd defines a stateful object on a chain connected to another -separate one. -NOTE: there must only be 2 defined ConnectionEnds to establish -a connection between two chains. -*/ -export interface V1ConnectionEnd { - /** client associated with this connection. */ - clientId?: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions?: V1Version[]; - /** current state of the connection end. */ - state?: V1State; - /** counterparty chain associated with this connection. */ - counterparty?: V1Counterparty; - /** - * delay period that must pass before a consensus state can be used for packet-verification - * NOTE: delay period logic is only implemented by some clients. - * @format uint64 - */ - delayPeriod?: string; -} -/** - * Counterparty defines the counterparty chain associated with a connection end. - */ -export interface V1Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - clientId?: string; - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connectionId?: string; - /** commitment merkle prefix of the counterparty chain. */ - prefix?: V1MerklePrefix; -} -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - /** @format uint64 */ - revisionHeight?: string; -} -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - clientId?: string; - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; -} -/** -* IdentifiedConnection defines a connection with additional connection -identifier field. -*/ -export interface V1IdentifiedConnection { - /** connection identifier. */ - id?: string; - /** client associated with this connection. */ - clientId?: string; - versions?: V1Version[]; - /** current state of the connection end. */ - state?: V1State; - /** counterparty chain associated with this connection. */ - counterparty?: V1Counterparty; - /** - * delay period associated with this connection. - * @format uint64 - */ - delayPeriod?: string; -} -export interface V1MerklePrefix { - /** @format byte */ - keyPrefix?: string; -} -/** - * MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. - */ -export declare type V1MsgConnectionOpenAckResponse = object; -/** - * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. - */ -export declare type V1MsgConnectionOpenConfirmResponse = object; -/** - * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. - */ -export declare type V1MsgConnectionOpenInitResponse = object; -/** - * MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. - */ -export declare type V1MsgConnectionOpenTryResponse = object; -export interface V1QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connectionPaths?: string[]; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryConnectionClientStateResponse { - /** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ - identifiedClientState?: V1IdentifiedClientState; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -export interface V1QueryConnectionConsensusStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; - clientId?: string; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -/** -* QueryConnectionResponse is the response type for the Query/Connection RPC -method. Besides the connection end, it includes a proof and the height from -which the proof was retrieved. -*/ -export interface V1QueryConnectionResponse { - /** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ - connection?: V1ConnectionEnd; - /** @format byte */ - proof?: string; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} -/** -* QueryConnectionsResponse is the response type for the Query/Connections RPC -method. -*/ -export interface V1QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections?: V1IdentifiedConnection[]; - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} -/** -* State defines if a connection is in one of the following states: -INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A connection end has just started the opening handshake. - - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty -chain. - - STATE_OPEN: A connection end has completed the handshake. -*/ -export declare enum V1State { - STATE_UNINITIALIZED_UNSPECIFIED = "STATE_UNINITIALIZED_UNSPECIFIED", - STATE_INIT = "STATE_INIT", - STATE_TRYOPEN = "STATE_TRYOPEN", - STATE_OPEN = "STATE_OPEN" -} -/** -* Version defines the versioning scheme used to negotiate the IBC verison in -the connection handshake. -*/ -export interface V1Version { - identifier?: string; - features?: string[]; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title ibc/core/connection/v1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryClientConnections - * @summary ClientConnections queries the connection paths associated with a client - state. - * @request GET:/ibc/core/connection/v1beta1/client_connections/{clientId} - */ - queryClientConnections: (clientId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConnections - * @summary Connections queries all the IBC connections of a chain. - * @request GET:/ibc/core/connection/v1beta1/connections - */ - queryConnections: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConnection - * @summary Connection queries an IBC connection end. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId} - */ - queryConnection: (connectionId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConnectionClientState - * @summary ConnectionClientState queries the client state associated with the - connection. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId}/client_state - */ - queryConnectionClientState: (connectionId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryConnectionConsensusState - * @summary ConnectionConsensusState queries the consensus state associated with the - connection. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId}/consensus_state/revision/{revisionNumber}/height/{revisionHeight} - */ - queryConnectionConsensusState: (connectionId: string, revisionNumber: string, revisionHeight: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.js deleted file mode 100644 index 4691d36..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.js +++ /dev/null @@ -1,231 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* State defines if a connection is in one of the following states: -INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A connection end has just started the opening handshake. - - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty -chain. - - STATE_OPEN: A connection end has completed the handshake. -*/ -export var V1State; -(function (V1State) { - V1State["STATE_UNINITIALIZED_UNSPECIFIED"] = "STATE_UNINITIALIZED_UNSPECIFIED"; - V1State["STATE_INIT"] = "STATE_INIT"; - V1State["STATE_TRYOPEN"] = "STATE_TRYOPEN"; - V1State["STATE_OPEN"] = "STATE_OPEN"; -})(V1State || (V1State = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title ibc/core/connection/v1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryClientConnections - * @summary ClientConnections queries the connection paths associated with a client - state. - * @request GET:/ibc/core/connection/v1beta1/client_connections/{clientId} - */ - this.queryClientConnections = (clientId, params = {}) => this.request({ - path: `/ibc/core/connection/v1beta1/client_connections/${clientId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConnections - * @summary Connections queries all the IBC connections of a chain. - * @request GET:/ibc/core/connection/v1beta1/connections - */ - this.queryConnections = (query, params = {}) => this.request({ - path: `/ibc/core/connection/v1beta1/connections`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConnection - * @summary Connection queries an IBC connection end. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId} - */ - this.queryConnection = (connectionId, params = {}) => this.request({ - path: `/ibc/core/connection/v1beta1/connections/${connectionId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConnectionClientState - * @summary ConnectionClientState queries the client state associated with the - connection. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId}/client_state - */ - this.queryConnectionClientState = (connectionId, params = {}) => this.request({ - path: `/ibc/core/connection/v1beta1/connections/${connectionId}/client_state`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryConnectionConsensusState - * @summary ConnectionConsensusState queries the consensus state associated with the - connection. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId}/consensus_state/revision/{revisionNumber}/height/{revisionHeight} - */ - this.queryConnectionConsensusState = (connectionId, revisionNumber, revisionHeight, params = {}) => this.request({ - path: `/ibc/core/connection/v1beta1/connections/${connectionId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.ts deleted file mode 100644 index d6b255b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/rest.ts +++ /dev/null @@ -1,910 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `Any` contains an arbitrary serialized protocol buffer message along with a -URL that describes the type of the serialized message. - -Protobuf library provides support to pack/unpack Any values in the form -of utility functions or additional generated methods of the Any type. - -Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - -Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - -The pack methods provided by protobuf library will by default use -'type.googleapis.com/full.type.name' as the type URL and the unpack -methods only use the fully qualified type name after the last '/' -in the type URL, for example "foo.bar.com/x/y.z" will yield type -name "y.z". - - -JSON -==== -The JSON representation of an `Any` value uses the regular -representation of the deserialized, embedded message, with an -additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - -If the embedded message type is well-known and has a custom JSON -representation, that representation will be embedded adding a field -`value` which holds the custom JSON in addition to the `@type` -field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -*/ -export interface ProtobufAny { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl?: string; - - /** - * Must be a valid serialized protocol buffer of the above specified type. - * @format byte - */ - value?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* ConnectionEnd defines a stateful object on a chain connected to another -separate one. -NOTE: there must only be 2 defined ConnectionEnds to establish -a connection between two chains. -*/ -export interface V1ConnectionEnd { - /** client associated with this connection. */ - clientId?: string; - - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions?: V1Version[]; - - /** current state of the connection end. */ - state?: V1State; - - /** counterparty chain associated with this connection. */ - counterparty?: V1Counterparty; - - /** - * delay period that must pass before a consensus state can be used for packet-verification - * NOTE: delay period logic is only implemented by some clients. - * @format uint64 - */ - delayPeriod?: string; -} - -/** - * Counterparty defines the counterparty chain associated with a connection end. - */ -export interface V1Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - clientId?: string; - - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connectionId?: string; - - /** commitment merkle prefix of the counterparty chain. */ - prefix?: V1MerklePrefix; -} - -/** -* Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -the same. However some consensus algorithms may choose to reset the -height in certain conditions e.g. hard forks, state-machine breaking changes -In these cases, the RevisionNumber is incremented so that height continues to -be monitonically increasing even as the RevisionHeight gets reset -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - - /** @format uint64 */ - revisionHeight?: string; -} - -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - clientId?: string; - - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - clientState?: ProtobufAny; -} - -/** -* IdentifiedConnection defines a connection with additional connection -identifier field. -*/ -export interface V1IdentifiedConnection { - /** connection identifier. */ - id?: string; - - /** client associated with this connection. */ - clientId?: string; - versions?: V1Version[]; - - /** current state of the connection end. */ - state?: V1State; - - /** counterparty chain associated with this connection. */ - counterparty?: V1Counterparty; - - /** - * delay period associated with this connection. - * @format uint64 - */ - delayPeriod?: string; -} - -export interface V1MerklePrefix { - /** @format byte */ - keyPrefix?: string; -} - -/** - * MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. - */ -export type V1MsgConnectionOpenAckResponse = object; - -/** - * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. - */ -export type V1MsgConnectionOpenConfirmResponse = object; - -/** - * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. - */ -export type V1MsgConnectionOpenInitResponse = object; - -/** - * MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. - */ -export type V1MsgConnectionOpenTryResponse = object; - -export interface V1QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connectionPaths?: string[]; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryConnectionClientStateResponse { - /** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ - identifiedClientState?: V1IdentifiedClientState; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -export interface V1QueryConnectionConsensusStateResponse { - /** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ - consensusState?: ProtobufAny; - clientId?: string; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -/** -* QueryConnectionResponse is the response type for the Query/Connection RPC -method. Besides the connection end, it includes a proof and the height from -which the proof was retrieved. -*/ -export interface V1QueryConnectionResponse { - /** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ - connection?: V1ConnectionEnd; - - /** @format byte */ - proof?: string; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - proofHeight?: V1Height; -} - -/** -* QueryConnectionsResponse is the response type for the Query/Connections RPC -method. -*/ -export interface V1QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections?: V1IdentifiedConnection[]; - - /** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ - height?: V1Height; -} - -/** -* State defines if a connection is in one of the following states: -INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A connection end has just started the opening handshake. - - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty -chain. - - STATE_OPEN: A connection end has completed the handshake. -*/ -export enum V1State { - STATE_UNINITIALIZED_UNSPECIFIED = "STATE_UNINITIALIZED_UNSPECIFIED", - STATE_INIT = "STATE_INIT", - STATE_TRYOPEN = "STATE_TRYOPEN", - STATE_OPEN = "STATE_OPEN", -} - -/** -* Version defines the versioning scheme used to negotiate the IBC verison in -the connection handshake. -*/ -export interface V1Version { - identifier?: string; - features?: string[]; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - * @format byte - */ - key?: string; - - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - * @format uint64 - */ - offset?: string; - - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - * @format uint64 - */ - limit?: string; - - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal?: boolean; -} - -/** -* PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/core/connection/v1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryClientConnections - * @summary ClientConnections queries the connection paths associated with a client -state. - * @request GET:/ibc/core/connection/v1beta1/client_connections/{clientId} - */ - queryClientConnections = (clientId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/connection/v1beta1/client_connections/${clientId}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnections - * @summary Connections queries all the IBC connections of a chain. - * @request GET:/ibc/core/connection/v1beta1/connections - */ - queryConnections = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/connection/v1beta1/connections`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnection - * @summary Connection queries an IBC connection end. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId} - */ - queryConnection = (connectionId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/connection/v1beta1/connections/${connectionId}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnectionClientState - * @summary ConnectionClientState queries the client state associated with the -connection. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId}/client_state - */ - queryConnectionClientState = (connectionId: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/connection/v1beta1/connections/${connectionId}/client_state`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnectionConsensusState - * @summary ConnectionConsensusState queries the consensus state associated with the -connection. - * @request GET:/ibc/core/connection/v1beta1/connections/{connectionId}/consensus_state/revision/{revisionNumber}/height/{revisionHeight} - */ - queryConnectionConsensusState = ( - connectionId: string, - revisionNumber: string, - revisionHeight: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/connection/v1beta1/connections/${connectionId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.d.ts deleted file mode 100644 index 22942ae..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.d.ts +++ /dev/null @@ -1,314 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ics23"; -export declare enum HashOp { - /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ - NO_HASH = 0, - SHA256 = 1, - SHA512 = 2, - KECCAK = 3, - RIPEMD160 = 4, - /** BITCOIN - ripemd160(sha256(x)) */ - BITCOIN = 5, - UNRECOGNIZED = -1 -} -export declare function hashOpFromJSON(object: any): HashOp; -export declare function hashOpToJSON(object: HashOp): string; -/** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - */ -export declare enum LengthOp { - /** NO_PREFIX - NO_PREFIX don't include any length info */ - NO_PREFIX = 0, - /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */ - VAR_PROTO = 1, - /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */ - VAR_RLP = 2, - /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */ - FIXED32_BIG = 3, - /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */ - FIXED32_LITTLE = 4, - /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */ - FIXED64_BIG = 5, - /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */ - FIXED64_LITTLE = 6, - /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */ - REQUIRE_32_BYTES = 7, - /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */ - REQUIRE_64_BYTES = 8, - UNRECOGNIZED = -1 -} -export declare function lengthOpFromJSON(object: any): LengthOp; -export declare function lengthOpToJSON(object: LengthOp): string; -/** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ -export interface ExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - path: InnerOp[]; -} -/** - * NonExistenceProof takes a proof of two neighbors, one left of the desired key, - * one right of the desired key. If both proofs are valid AND they are neighbors, - * then there is no valid proof for the given key. - */ -export interface NonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: ExistenceProof | undefined; - right: ExistenceProof | undefined; -} -/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ -export interface CommitmentProof { - exist: ExistenceProof | undefined; - nonexist: NonExistenceProof | undefined; - batch: BatchProof | undefined; - compressed: CompressedBatchProof | undefined; -} -/** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ -export interface LeafOp { - hash: HashOp; - prehashKey: HashOp; - prehashValue: HashOp; - length: LengthOp; - /** - * prefix is a fixed bytes that may optionally be included at the beginning to differentiate - * a leaf node from an inner node. - */ - prefix: Uint8Array; -} -/** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ -export interface InnerOp { - hash: HashOp; - prefix: Uint8Array; - suffix: Uint8Array; -} -/** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ -export interface ProofSpec { - /** - * any field in the ExistenceProof must be the same as in this spec. - * except Prefix, which is just the first bytes of prefix (spec can be longer) - */ - leafSpec: LeafOp | undefined; - innerSpec: InnerSpec | undefined; - /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */ - maxDepth: number; - /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */ - minDepth: number; -} -/** - * InnerSpec contains all store-specific structure info to determine if two proofs from a - * given store are neighbors. - * - * This enables: - * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) - */ -export interface InnerSpec { - /** - * Child order is the ordering of the children node, must count from 0 - * iavl tree is [0, 1] (left then right) - * merk is [0, 2, 1] (left, right, here) - */ - childOrder: number[]; - childSize: number; - minPrefixLength: number; - maxPrefixLength: number; - /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */ - emptyChild: Uint8Array; - /** hash is the algorithm that must be used for each InnerOp */ - hash: HashOp; -} -/** BatchProof is a group of multiple proof types than can be compressed */ -export interface BatchProof { - entries: BatchEntry[]; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface BatchEntry { - exist: ExistenceProof | undefined; - nonexist: NonExistenceProof | undefined; -} -export interface CompressedBatchProof { - entries: CompressedBatchEntry[]; - lookupInners: InnerOp[]; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface CompressedBatchEntry { - exist: CompressedExistenceProof | undefined; - nonexist: CompressedNonExistenceProof | undefined; -} -export interface CompressedExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - /** these are indexes into the lookup_inners table in CompressedBatchProof */ - path: number[]; -} -export interface CompressedNonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: CompressedExistenceProof | undefined; - right: CompressedExistenceProof | undefined; -} -export declare const ExistenceProof: { - encode(message: ExistenceProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExistenceProof; - fromJSON(object: any): ExistenceProof; - toJSON(message: ExistenceProof): unknown; - fromPartial(object: DeepPartial): ExistenceProof; -}; -export declare const NonExistenceProof: { - encode(message: NonExistenceProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): NonExistenceProof; - fromJSON(object: any): NonExistenceProof; - toJSON(message: NonExistenceProof): unknown; - fromPartial(object: DeepPartial): NonExistenceProof; -}; -export declare const CommitmentProof: { - encode(message: CommitmentProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommitmentProof; - fromJSON(object: any): CommitmentProof; - toJSON(message: CommitmentProof): unknown; - fromPartial(object: DeepPartial): CommitmentProof; -}; -export declare const LeafOp: { - encode(message: LeafOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LeafOp; - fromJSON(object: any): LeafOp; - toJSON(message: LeafOp): unknown; - fromPartial(object: DeepPartial): LeafOp; -}; -export declare const InnerOp: { - encode(message: InnerOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): InnerOp; - fromJSON(object: any): InnerOp; - toJSON(message: InnerOp): unknown; - fromPartial(object: DeepPartial): InnerOp; -}; -export declare const ProofSpec: { - encode(message: ProofSpec, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofSpec; - fromJSON(object: any): ProofSpec; - toJSON(message: ProofSpec): unknown; - fromPartial(object: DeepPartial): ProofSpec; -}; -export declare const InnerSpec: { - encode(message: InnerSpec, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): InnerSpec; - fromJSON(object: any): InnerSpec; - toJSON(message: InnerSpec): unknown; - fromPartial(object: DeepPartial): InnerSpec; -}; -export declare const BatchProof: { - encode(message: BatchProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BatchProof; - fromJSON(object: any): BatchProof; - toJSON(message: BatchProof): unknown; - fromPartial(object: DeepPartial): BatchProof; -}; -export declare const BatchEntry: { - encode(message: BatchEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BatchEntry; - fromJSON(object: any): BatchEntry; - toJSON(message: BatchEntry): unknown; - fromPartial(object: DeepPartial): BatchEntry; -}; -export declare const CompressedBatchProof: { - encode(message: CompressedBatchProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CompressedBatchProof; - fromJSON(object: any): CompressedBatchProof; - toJSON(message: CompressedBatchProof): unknown; - fromPartial(object: DeepPartial): CompressedBatchProof; -}; -export declare const CompressedBatchEntry: { - encode(message: CompressedBatchEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CompressedBatchEntry; - fromJSON(object: any): CompressedBatchEntry; - toJSON(message: CompressedBatchEntry): unknown; - fromPartial(object: DeepPartial): CompressedBatchEntry; -}; -export declare const CompressedExistenceProof: { - encode(message: CompressedExistenceProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CompressedExistenceProof; - fromJSON(object: any): CompressedExistenceProof; - toJSON(message: CompressedExistenceProof): unknown; - fromPartial(object: DeepPartial): CompressedExistenceProof; -}; -export declare const CompressedNonExistenceProof: { - encode(message: CompressedNonExistenceProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CompressedNonExistenceProof; - fromJSON(object: any): CompressedNonExistenceProof; - toJSON(message: CompressedNonExistenceProof): unknown; - fromPartial(object: DeepPartial): CompressedNonExistenceProof; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.js deleted file mode 100644 index 49721cf..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.js +++ /dev/null @@ -1,1521 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ics23"; -export var HashOp; -(function (HashOp) { - /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ - HashOp[HashOp["NO_HASH"] = 0] = "NO_HASH"; - HashOp[HashOp["SHA256"] = 1] = "SHA256"; - HashOp[HashOp["SHA512"] = 2] = "SHA512"; - HashOp[HashOp["KECCAK"] = 3] = "KECCAK"; - HashOp[HashOp["RIPEMD160"] = 4] = "RIPEMD160"; - /** BITCOIN - ripemd160(sha256(x)) */ - HashOp[HashOp["BITCOIN"] = 5] = "BITCOIN"; - HashOp[HashOp["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(HashOp || (HashOp = {})); -export function hashOpFromJSON(object) { - switch (object) { - case 0: - case "NO_HASH": - return HashOp.NO_HASH; - case 1: - case "SHA256": - return HashOp.SHA256; - case 2: - case "SHA512": - return HashOp.SHA512; - case 3: - case "KECCAK": - return HashOp.KECCAK; - case 4: - case "RIPEMD160": - return HashOp.RIPEMD160; - case 5: - case "BITCOIN": - return HashOp.BITCOIN; - case -1: - case "UNRECOGNIZED": - default: - return HashOp.UNRECOGNIZED; - } -} -export function hashOpToJSON(object) { - switch (object) { - case HashOp.NO_HASH: - return "NO_HASH"; - case HashOp.SHA256: - return "SHA256"; - case HashOp.SHA512: - return "SHA512"; - case HashOp.KECCAK: - return "KECCAK"; - case HashOp.RIPEMD160: - return "RIPEMD160"; - case HashOp.BITCOIN: - return "BITCOIN"; - default: - return "UNKNOWN"; - } -} -/** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - */ -export var LengthOp; -(function (LengthOp) { - /** NO_PREFIX - NO_PREFIX don't include any length info */ - LengthOp[LengthOp["NO_PREFIX"] = 0] = "NO_PREFIX"; - /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */ - LengthOp[LengthOp["VAR_PROTO"] = 1] = "VAR_PROTO"; - /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */ - LengthOp[LengthOp["VAR_RLP"] = 2] = "VAR_RLP"; - /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */ - LengthOp[LengthOp["FIXED32_BIG"] = 3] = "FIXED32_BIG"; - /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */ - LengthOp[LengthOp["FIXED32_LITTLE"] = 4] = "FIXED32_LITTLE"; - /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */ - LengthOp[LengthOp["FIXED64_BIG"] = 5] = "FIXED64_BIG"; - /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */ - LengthOp[LengthOp["FIXED64_LITTLE"] = 6] = "FIXED64_LITTLE"; - /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */ - LengthOp[LengthOp["REQUIRE_32_BYTES"] = 7] = "REQUIRE_32_BYTES"; - /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */ - LengthOp[LengthOp["REQUIRE_64_BYTES"] = 8] = "REQUIRE_64_BYTES"; - LengthOp[LengthOp["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(LengthOp || (LengthOp = {})); -export function lengthOpFromJSON(object) { - switch (object) { - case 0: - case "NO_PREFIX": - return LengthOp.NO_PREFIX; - case 1: - case "VAR_PROTO": - return LengthOp.VAR_PROTO; - case 2: - case "VAR_RLP": - return LengthOp.VAR_RLP; - case 3: - case "FIXED32_BIG": - return LengthOp.FIXED32_BIG; - case 4: - case "FIXED32_LITTLE": - return LengthOp.FIXED32_LITTLE; - case 5: - case "FIXED64_BIG": - return LengthOp.FIXED64_BIG; - case 6: - case "FIXED64_LITTLE": - return LengthOp.FIXED64_LITTLE; - case 7: - case "REQUIRE_32_BYTES": - return LengthOp.REQUIRE_32_BYTES; - case 8: - case "REQUIRE_64_BYTES": - return LengthOp.REQUIRE_64_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return LengthOp.UNRECOGNIZED; - } -} -export function lengthOpToJSON(object) { - switch (object) { - case LengthOp.NO_PREFIX: - return "NO_PREFIX"; - case LengthOp.VAR_PROTO: - return "VAR_PROTO"; - case LengthOp.VAR_RLP: - return "VAR_RLP"; - case LengthOp.FIXED32_BIG: - return "FIXED32_BIG"; - case LengthOp.FIXED32_LITTLE: - return "FIXED32_LITTLE"; - case LengthOp.FIXED64_BIG: - return "FIXED64_BIG"; - case LengthOp.FIXED64_LITTLE: - return "FIXED64_LITTLE"; - case LengthOp.REQUIRE_32_BYTES: - return "REQUIRE_32_BYTES"; - case LengthOp.REQUIRE_64_BYTES: - return "REQUIRE_64_BYTES"; - default: - return "UNKNOWN"; - } -} -const baseExistenceProof = {}; -export const ExistenceProof = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.path) { - InnerOp.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExistenceProof }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - message.path.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExistenceProof }; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromJSON(object.leaf); - } - else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(InnerOp.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.leaf !== undefined && - (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map((e) => (e ? InnerOp.toJSON(e) : undefined)); - } - else { - obj.path = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExistenceProof }; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromPartial(object.leaf); - } - else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(InnerOp.fromPartial(e)); - } - } - return message; - }, -}; -const baseNonExistenceProof = {}; -export const NonExistenceProof = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - ExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim(); - } - if (message.right !== undefined) { - ExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseNonExistenceProof }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseNonExistenceProof }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.left !== undefined && object.left !== null) { - message.left = ExistenceProof.fromJSON(object.left); - } - else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = ExistenceProof.fromJSON(object.right); - } - else { - message.right = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.left !== undefined && - (obj.left = message.left - ? ExistenceProof.toJSON(message.left) - : undefined); - message.right !== undefined && - (obj.right = message.right - ? ExistenceProof.toJSON(message.right) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseNonExistenceProof }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.left !== undefined && object.left !== null) { - message.left = ExistenceProof.fromPartial(object.left); - } - else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = ExistenceProof.fromPartial(object.right); - } - else { - message.right = undefined; - } - return message; - }, -}; -const baseCommitmentProof = {}; -export const CommitmentProof = { - encode(message, writer = Writer.create()) { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).ldelim(); - } - if (message.batch !== undefined) { - BatchProof.encode(message.batch, writer.uint32(26).fork()).ldelim(); - } - if (message.compressed !== undefined) { - CompressedBatchProof.encode(message.compressed, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitmentProof }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = CompressedBatchProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommitmentProof }; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromJSON(object.exist); - } - else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromJSON(object.nonexist); - } - else { - message.nonexist = undefined; - } - if (object.batch !== undefined && object.batch !== null) { - message.batch = BatchProof.fromJSON(object.batch); - } - else { - message.batch = undefined; - } - if (object.compressed !== undefined && object.compressed !== null) { - message.compressed = CompressedBatchProof.fromJSON(object.compressed); - } - else { - message.compressed = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? ExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? NonExistenceProof.toJSON(message.nonexist) - : undefined); - message.batch !== undefined && - (obj.batch = message.batch - ? BatchProof.toJSON(message.batch) - : undefined); - message.compressed !== undefined && - (obj.compressed = message.compressed - ? CompressedBatchProof.toJSON(message.compressed) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommitmentProof }; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromPartial(object.exist); - } - else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromPartial(object.nonexist); - } - else { - message.nonexist = undefined; - } - if (object.batch !== undefined && object.batch !== null) { - message.batch = BatchProof.fromPartial(object.batch); - } - else { - message.batch = undefined; - } - if (object.compressed !== undefined && object.compressed !== null) { - message.compressed = CompressedBatchProof.fromPartial(object.compressed); - } - else { - message.compressed = undefined; - } - return message; - }, -}; -const baseLeafOp = { - hash: 0, - prehashKey: 0, - prehashValue: 0, - length: 0, -}; -export const LeafOp = { - encode(message, writer = Writer.create()) { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prehashKey !== 0) { - writer.uint32(16).int32(message.prehashKey); - } - if (message.prehashValue !== 0) { - writer.uint32(24).int32(message.prehashValue); - } - if (message.length !== 0) { - writer.uint32(32).int32(message.length); - } - if (message.prefix.length !== 0) { - writer.uint32(42).bytes(message.prefix); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLeafOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32(); - break; - case 2: - message.prehashKey = reader.int32(); - break; - case 3: - message.prehashValue = reader.int32(); - break; - case 4: - message.length = reader.int32(); - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLeafOp }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } - else { - message.hash = 0; - } - if (object.prehashKey !== undefined && object.prehashKey !== null) { - message.prehashKey = hashOpFromJSON(object.prehashKey); - } - else { - message.prehashKey = 0; - } - if (object.prehashValue !== undefined && object.prehashValue !== null) { - message.prehashValue = hashOpFromJSON(object.prehashValue); - } - else { - message.prehashValue = 0; - } - if (object.length !== undefined && object.length !== null) { - message.length = lengthOpFromJSON(object.length); - } - else { - message.length = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = bytesFromBase64(object.prefix); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prehashKey !== undefined && - (obj.prehashKey = hashOpToJSON(message.prehashKey)); - message.prehashValue !== undefined && - (obj.prehashValue = hashOpToJSON(message.prehashValue)); - message.length !== undefined && - (obj.length = lengthOpToJSON(message.length)); - message.prefix !== undefined && - (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseLeafOp }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = 0; - } - if (object.prehashKey !== undefined && object.prehashKey !== null) { - message.prehashKey = object.prehashKey; - } - else { - message.prehashKey = 0; - } - if (object.prehashValue !== undefined && object.prehashValue !== null) { - message.prehashValue = object.prehashValue; - } - else { - message.prehashValue = 0; - } - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } - else { - message.length = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = object.prefix; - } - else { - message.prefix = new Uint8Array(); - } - return message; - }, -}; -const baseInnerOp = { hash: 0 }; -export const InnerOp = { - encode(message, writer = Writer.create()) { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prefix.length !== 0) { - writer.uint32(18).bytes(message.prefix); - } - if (message.suffix.length !== 0) { - writer.uint32(26).bytes(message.suffix); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInnerOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32(); - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseInnerOp }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } - else { - message.hash = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = bytesFromBase64(object.prefix); - } - if (object.suffix !== undefined && object.suffix !== null) { - message.suffix = bytesFromBase64(object.suffix); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prefix !== undefined && - (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array())); - message.suffix !== undefined && - (obj.suffix = base64FromBytes(message.suffix !== undefined ? message.suffix : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseInnerOp }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = object.prefix; - } - else { - message.prefix = new Uint8Array(); - } - if (object.suffix !== undefined && object.suffix !== null) { - message.suffix = object.suffix; - } - else { - message.suffix = new Uint8Array(); - } - return message; - }, -}; -const baseProofSpec = { maxDepth: 0, minDepth: 0 }; -export const ProofSpec = { - encode(message, writer = Writer.create()) { - if (message.leafSpec !== undefined) { - LeafOp.encode(message.leafSpec, writer.uint32(10).fork()).ldelim(); - } - if (message.innerSpec !== undefined) { - InnerSpec.encode(message.innerSpec, writer.uint32(18).fork()).ldelim(); - } - if (message.maxDepth !== 0) { - writer.uint32(24).int32(message.maxDepth); - } - if (message.minDepth !== 0) { - writer.uint32(32).int32(message.minDepth); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofSpec }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leafSpec = LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.innerSpec = InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.maxDepth = reader.int32(); - break; - case 4: - message.minDepth = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofSpec }; - if (object.leafSpec !== undefined && object.leafSpec !== null) { - message.leafSpec = LeafOp.fromJSON(object.leafSpec); - } - else { - message.leafSpec = undefined; - } - if (object.innerSpec !== undefined && object.innerSpec !== null) { - message.innerSpec = InnerSpec.fromJSON(object.innerSpec); - } - else { - message.innerSpec = undefined; - } - if (object.maxDepth !== undefined && object.maxDepth !== null) { - message.maxDepth = Number(object.maxDepth); - } - else { - message.maxDepth = 0; - } - if (object.minDepth !== undefined && object.minDepth !== null) { - message.minDepth = Number(object.minDepth); - } - else { - message.minDepth = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.leafSpec !== undefined && - (obj.leafSpec = message.leafSpec - ? LeafOp.toJSON(message.leafSpec) - : undefined); - message.innerSpec !== undefined && - (obj.innerSpec = message.innerSpec - ? InnerSpec.toJSON(message.innerSpec) - : undefined); - message.maxDepth !== undefined && (obj.maxDepth = message.maxDepth); - message.minDepth !== undefined && (obj.minDepth = message.minDepth); - return obj; - }, - fromPartial(object) { - const message = { ...baseProofSpec }; - if (object.leafSpec !== undefined && object.leafSpec !== null) { - message.leafSpec = LeafOp.fromPartial(object.leafSpec); - } - else { - message.leafSpec = undefined; - } - if (object.innerSpec !== undefined && object.innerSpec !== null) { - message.innerSpec = InnerSpec.fromPartial(object.innerSpec); - } - else { - message.innerSpec = undefined; - } - if (object.maxDepth !== undefined && object.maxDepth !== null) { - message.maxDepth = object.maxDepth; - } - else { - message.maxDepth = 0; - } - if (object.minDepth !== undefined && object.minDepth !== null) { - message.minDepth = object.minDepth; - } - else { - message.minDepth = 0; - } - return message; - }, -}; -const baseInnerSpec = { - childOrder: 0, - childSize: 0, - minPrefixLength: 0, - maxPrefixLength: 0, - hash: 0, -}; -export const InnerSpec = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.childOrder) { - writer.int32(v); - } - writer.ldelim(); - if (message.childSize !== 0) { - writer.uint32(16).int32(message.childSize); - } - if (message.minPrefixLength !== 0) { - writer.uint32(24).int32(message.minPrefixLength); - } - if (message.maxPrefixLength !== 0) { - writer.uint32(32).int32(message.maxPrefixLength); - } - if (message.emptyChild.length !== 0) { - writer.uint32(42).bytes(message.emptyChild); - } - if (message.hash !== 0) { - writer.uint32(48).int32(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInnerSpec }; - message.childOrder = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.childOrder.push(reader.int32()); - } - } - else { - message.childOrder.push(reader.int32()); - } - break; - case 2: - message.childSize = reader.int32(); - break; - case 3: - message.minPrefixLength = reader.int32(); - break; - case 4: - message.maxPrefixLength = reader.int32(); - break; - case 5: - message.emptyChild = reader.bytes(); - break; - case 6: - message.hash = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseInnerSpec }; - message.childOrder = []; - if (object.childOrder !== undefined && object.childOrder !== null) { - for (const e of object.childOrder) { - message.childOrder.push(Number(e)); - } - } - if (object.childSize !== undefined && object.childSize !== null) { - message.childSize = Number(object.childSize); - } - else { - message.childSize = 0; - } - if (object.minPrefixLength !== undefined && - object.minPrefixLength !== null) { - message.minPrefixLength = Number(object.minPrefixLength); - } - else { - message.minPrefixLength = 0; - } - if (object.maxPrefixLength !== undefined && - object.maxPrefixLength !== null) { - message.maxPrefixLength = Number(object.maxPrefixLength); - } - else { - message.maxPrefixLength = 0; - } - if (object.emptyChild !== undefined && object.emptyChild !== null) { - message.emptyChild = bytesFromBase64(object.emptyChild); - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } - else { - message.hash = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.childOrder) { - obj.childOrder = message.childOrder.map((e) => e); - } - else { - obj.childOrder = []; - } - message.childSize !== undefined && (obj.childSize = message.childSize); - message.minPrefixLength !== undefined && - (obj.minPrefixLength = message.minPrefixLength); - message.maxPrefixLength !== undefined && - (obj.maxPrefixLength = message.maxPrefixLength); - message.emptyChild !== undefined && - (obj.emptyChild = base64FromBytes(message.emptyChild !== undefined ? message.emptyChild : new Uint8Array())); - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - return obj; - }, - fromPartial(object) { - const message = { ...baseInnerSpec }; - message.childOrder = []; - if (object.childOrder !== undefined && object.childOrder !== null) { - for (const e of object.childOrder) { - message.childOrder.push(e); - } - } - if (object.childSize !== undefined && object.childSize !== null) { - message.childSize = object.childSize; - } - else { - message.childSize = 0; - } - if (object.minPrefixLength !== undefined && - object.minPrefixLength !== null) { - message.minPrefixLength = object.minPrefixLength; - } - else { - message.minPrefixLength = 0; - } - if (object.maxPrefixLength !== undefined && - object.maxPrefixLength !== null) { - message.maxPrefixLength = object.maxPrefixLength; - } - else { - message.maxPrefixLength = 0; - } - if (object.emptyChild !== undefined && object.emptyChild !== null) { - message.emptyChild = object.emptyChild; - } - else { - message.emptyChild = new Uint8Array(); - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = 0; - } - return message; - }, -}; -const baseBatchProof = {}; -export const BatchProof = { - encode(message, writer = Writer.create()) { - for (const v of message.entries) { - BatchEntry.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchProof }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBatchProof }; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(BatchEntry.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => e ? BatchEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseBatchProof }; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(BatchEntry.fromPartial(e)); - } - } - return message; - }, -}; -const baseBatchEntry = {}; -export const BatchEntry = { - encode(message, writer = Writer.create()) { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchEntry }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBatchEntry }; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromJSON(object.exist); - } - else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromJSON(object.nonexist); - } - else { - message.nonexist = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? ExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? NonExistenceProof.toJSON(message.nonexist) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseBatchEntry }; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromPartial(object.exist); - } - else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromPartial(object.nonexist); - } - else { - message.nonexist = undefined; - } - return message; - }, -}; -const baseCompressedBatchProof = {}; -export const CompressedBatchProof = { - encode(message, writer = Writer.create()) { - for (const v of message.entries) { - CompressedBatchEntry.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.lookupInners) { - InnerOp.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompressedBatchProof }; - message.entries = []; - message.lookupInners = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(CompressedBatchEntry.decode(reader, reader.uint32())); - break; - case 2: - message.lookupInners.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCompressedBatchProof }; - message.entries = []; - message.lookupInners = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(CompressedBatchEntry.fromJSON(e)); - } - } - if (object.lookupInners !== undefined && object.lookupInners !== null) { - for (const e of object.lookupInners) { - message.lookupInners.push(InnerOp.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => e ? CompressedBatchEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - if (message.lookupInners) { - obj.lookupInners = message.lookupInners.map((e) => e ? InnerOp.toJSON(e) : undefined); - } - else { - obj.lookupInners = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseCompressedBatchProof }; - message.entries = []; - message.lookupInners = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(CompressedBatchEntry.fromPartial(e)); - } - } - if (object.lookupInners !== undefined && object.lookupInners !== null) { - for (const e of object.lookupInners) { - message.lookupInners.push(InnerOp.fromPartial(e)); - } - } - return message; - }, -}; -const baseCompressedBatchEntry = {}; -export const CompressedBatchEntry = { - encode(message, writer = Writer.create()) { - if (message.exist !== undefined) { - CompressedExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - CompressedNonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompressedBatchEntry }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = CompressedNonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCompressedBatchEntry }; - if (object.exist !== undefined && object.exist !== null) { - message.exist = CompressedExistenceProof.fromJSON(object.exist); - } - else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = CompressedNonExistenceProof.fromJSON(object.nonexist); - } - else { - message.nonexist = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? CompressedExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? CompressedNonExistenceProof.toJSON(message.nonexist) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseCompressedBatchEntry }; - if (object.exist !== undefined && object.exist !== null) { - message.exist = CompressedExistenceProof.fromPartial(object.exist); - } - else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = CompressedNonExistenceProof.fromPartial(object.nonexist); - } - else { - message.nonexist = undefined; - } - return message; - }, -}; -const baseCompressedExistenceProof = { path: 0 }; -export const CompressedExistenceProof = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCompressedExistenceProof, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCompressedExistenceProof, - }; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromJSON(object.leaf); - } - else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.leaf !== undefined && - (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseCompressedExistenceProof, - }; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromPartial(object.leaf); - } - else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - return message; - }, -}; -const baseCompressedNonExistenceProof = {}; -export const CompressedNonExistenceProof = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - CompressedExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim(); - } - if (message.right !== undefined) { - CompressedExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCompressedNonExistenceProof, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCompressedNonExistenceProof, - }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.left !== undefined && object.left !== null) { - message.left = CompressedExistenceProof.fromJSON(object.left); - } - else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = CompressedExistenceProof.fromJSON(object.right); - } - else { - message.right = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.left !== undefined && - (obj.left = message.left - ? CompressedExistenceProof.toJSON(message.left) - : undefined); - message.right !== undefined && - (obj.right = message.right - ? CompressedExistenceProof.toJSON(message.right) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseCompressedNonExistenceProof, - }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.left !== undefined && object.left !== null) { - message.left = CompressedExistenceProof.fromPartial(object.left); - } - else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = CompressedExistenceProof.fromPartial(object.right); - } - else { - message.right = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.ts deleted file mode 100644 index 8a7639b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/confio/proofs.ts +++ /dev/null @@ -1,1829 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ics23"; - -export enum HashOp { - /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ - NO_HASH = 0, - SHA256 = 1, - SHA512 = 2, - KECCAK = 3, - RIPEMD160 = 4, - /** BITCOIN - ripemd160(sha256(x)) */ - BITCOIN = 5, - UNRECOGNIZED = -1, -} - -export function hashOpFromJSON(object: any): HashOp { - switch (object) { - case 0: - case "NO_HASH": - return HashOp.NO_HASH; - case 1: - case "SHA256": - return HashOp.SHA256; - case 2: - case "SHA512": - return HashOp.SHA512; - case 3: - case "KECCAK": - return HashOp.KECCAK; - case 4: - case "RIPEMD160": - return HashOp.RIPEMD160; - case 5: - case "BITCOIN": - return HashOp.BITCOIN; - case -1: - case "UNRECOGNIZED": - default: - return HashOp.UNRECOGNIZED; - } -} - -export function hashOpToJSON(object: HashOp): string { - switch (object) { - case HashOp.NO_HASH: - return "NO_HASH"; - case HashOp.SHA256: - return "SHA256"; - case HashOp.SHA512: - return "SHA512"; - case HashOp.KECCAK: - return "KECCAK"; - case HashOp.RIPEMD160: - return "RIPEMD160"; - case HashOp.BITCOIN: - return "BITCOIN"; - default: - return "UNKNOWN"; - } -} - -/** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - */ -export enum LengthOp { - /** NO_PREFIX - NO_PREFIX don't include any length info */ - NO_PREFIX = 0, - /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */ - VAR_PROTO = 1, - /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */ - VAR_RLP = 2, - /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */ - FIXED32_BIG = 3, - /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */ - FIXED32_LITTLE = 4, - /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */ - FIXED64_BIG = 5, - /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */ - FIXED64_LITTLE = 6, - /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */ - REQUIRE_32_BYTES = 7, - /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */ - REQUIRE_64_BYTES = 8, - UNRECOGNIZED = -1, -} - -export function lengthOpFromJSON(object: any): LengthOp { - switch (object) { - case 0: - case "NO_PREFIX": - return LengthOp.NO_PREFIX; - case 1: - case "VAR_PROTO": - return LengthOp.VAR_PROTO; - case 2: - case "VAR_RLP": - return LengthOp.VAR_RLP; - case 3: - case "FIXED32_BIG": - return LengthOp.FIXED32_BIG; - case 4: - case "FIXED32_LITTLE": - return LengthOp.FIXED32_LITTLE; - case 5: - case "FIXED64_BIG": - return LengthOp.FIXED64_BIG; - case 6: - case "FIXED64_LITTLE": - return LengthOp.FIXED64_LITTLE; - case 7: - case "REQUIRE_32_BYTES": - return LengthOp.REQUIRE_32_BYTES; - case 8: - case "REQUIRE_64_BYTES": - return LengthOp.REQUIRE_64_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return LengthOp.UNRECOGNIZED; - } -} - -export function lengthOpToJSON(object: LengthOp): string { - switch (object) { - case LengthOp.NO_PREFIX: - return "NO_PREFIX"; - case LengthOp.VAR_PROTO: - return "VAR_PROTO"; - case LengthOp.VAR_RLP: - return "VAR_RLP"; - case LengthOp.FIXED32_BIG: - return "FIXED32_BIG"; - case LengthOp.FIXED32_LITTLE: - return "FIXED32_LITTLE"; - case LengthOp.FIXED64_BIG: - return "FIXED64_BIG"; - case LengthOp.FIXED64_LITTLE: - return "FIXED64_LITTLE"; - case LengthOp.REQUIRE_32_BYTES: - return "REQUIRE_32_BYTES"; - case LengthOp.REQUIRE_64_BYTES: - return "REQUIRE_64_BYTES"; - default: - return "UNKNOWN"; - } -} - -/** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ -export interface ExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - path: InnerOp[]; -} - -/** - * NonExistenceProof takes a proof of two neighbors, one left of the desired key, - * one right of the desired key. If both proofs are valid AND they are neighbors, - * then there is no valid proof for the given key. - */ -export interface NonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: ExistenceProof | undefined; - right: ExistenceProof | undefined; -} - -/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ -export interface CommitmentProof { - exist: ExistenceProof | undefined; - nonexist: NonExistenceProof | undefined; - batch: BatchProof | undefined; - compressed: CompressedBatchProof | undefined; -} - -/** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ -export interface LeafOp { - hash: HashOp; - prehashKey: HashOp; - prehashValue: HashOp; - length: LengthOp; - /** - * prefix is a fixed bytes that may optionally be included at the beginning to differentiate - * a leaf node from an inner node. - */ - prefix: Uint8Array; -} - -/** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ -export interface InnerOp { - hash: HashOp; - prefix: Uint8Array; - suffix: Uint8Array; -} - -/** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ -export interface ProofSpec { - /** - * any field in the ExistenceProof must be the same as in this spec. - * except Prefix, which is just the first bytes of prefix (spec can be longer) - */ - leafSpec: LeafOp | undefined; - innerSpec: InnerSpec | undefined; - /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */ - maxDepth: number; - /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */ - minDepth: number; -} - -/** - * InnerSpec contains all store-specific structure info to determine if two proofs from a - * given store are neighbors. - * - * This enables: - * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) - */ -export interface InnerSpec { - /** - * Child order is the ordering of the children node, must count from 0 - * iavl tree is [0, 1] (left then right) - * merk is [0, 2, 1] (left, right, here) - */ - childOrder: number[]; - childSize: number; - minPrefixLength: number; - maxPrefixLength: number; - /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */ - emptyChild: Uint8Array; - /** hash is the algorithm that must be used for each InnerOp */ - hash: HashOp; -} - -/** BatchProof is a group of multiple proof types than can be compressed */ -export interface BatchProof { - entries: BatchEntry[]; -} - -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface BatchEntry { - exist: ExistenceProof | undefined; - nonexist: NonExistenceProof | undefined; -} - -export interface CompressedBatchProof { - entries: CompressedBatchEntry[]; - lookupInners: InnerOp[]; -} - -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface CompressedBatchEntry { - exist: CompressedExistenceProof | undefined; - nonexist: CompressedNonExistenceProof | undefined; -} - -export interface CompressedExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - /** these are indexes into the lookup_inners table in CompressedBatchProof */ - path: number[]; -} - -export interface CompressedNonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: CompressedExistenceProof | undefined; - right: CompressedExistenceProof | undefined; -} - -const baseExistenceProof: object = {}; - -export const ExistenceProof = { - encode(message: ExistenceProof, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.path) { - InnerOp.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExistenceProof } as ExistenceProof; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - message.path.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExistenceProof { - const message = { ...baseExistenceProof } as ExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromJSON(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(InnerOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.leaf !== undefined && - (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map((e) => (e ? InnerOp.toJSON(e) : undefined)); - } else { - obj.path = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ExistenceProof { - const message = { ...baseExistenceProof } as ExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromPartial(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(InnerOp.fromPartial(e)); - } - } - return message; - }, -}; - -const baseNonExistenceProof: object = {}; - -export const NonExistenceProof = { - encode(message: NonExistenceProof, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - ExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim(); - } - if (message.right !== undefined) { - ExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): NonExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseNonExistenceProof } as NonExistenceProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): NonExistenceProof { - const message = { ...baseNonExistenceProof } as NonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.left !== undefined && object.left !== null) { - message.left = ExistenceProof.fromJSON(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = ExistenceProof.fromJSON(object.right); - } else { - message.right = undefined; - } - return message; - }, - - toJSON(message: NonExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.left !== undefined && - (obj.left = message.left - ? ExistenceProof.toJSON(message.left) - : undefined); - message.right !== undefined && - (obj.right = message.right - ? ExistenceProof.toJSON(message.right) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): NonExistenceProof { - const message = { ...baseNonExistenceProof } as NonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.left !== undefined && object.left !== null) { - message.left = ExistenceProof.fromPartial(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = ExistenceProof.fromPartial(object.right); - } else { - message.right = undefined; - } - return message; - }, -}; - -const baseCommitmentProof: object = {}; - -export const CommitmentProof = { - encode(message: CommitmentProof, writer: Writer = Writer.create()): Writer { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode( - message.nonexist, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.batch !== undefined) { - BatchProof.encode(message.batch, writer.uint32(26).fork()).ldelim(); - } - if (message.compressed !== undefined) { - CompressedBatchProof.encode( - message.compressed, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitmentProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitmentProof } as CommitmentProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = CompressedBatchProof.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitmentProof { - const message = { ...baseCommitmentProof } as CommitmentProof; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromJSON(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromJSON(object.nonexist); - } else { - message.nonexist = undefined; - } - if (object.batch !== undefined && object.batch !== null) { - message.batch = BatchProof.fromJSON(object.batch); - } else { - message.batch = undefined; - } - if (object.compressed !== undefined && object.compressed !== null) { - message.compressed = CompressedBatchProof.fromJSON(object.compressed); - } else { - message.compressed = undefined; - } - return message; - }, - - toJSON(message: CommitmentProof): unknown { - const obj: any = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? ExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? NonExistenceProof.toJSON(message.nonexist) - : undefined); - message.batch !== undefined && - (obj.batch = message.batch - ? BatchProof.toJSON(message.batch) - : undefined); - message.compressed !== undefined && - (obj.compressed = message.compressed - ? CompressedBatchProof.toJSON(message.compressed) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): CommitmentProof { - const message = { ...baseCommitmentProof } as CommitmentProof; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromPartial(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromPartial(object.nonexist); - } else { - message.nonexist = undefined; - } - if (object.batch !== undefined && object.batch !== null) { - message.batch = BatchProof.fromPartial(object.batch); - } else { - message.batch = undefined; - } - if (object.compressed !== undefined && object.compressed !== null) { - message.compressed = CompressedBatchProof.fromPartial(object.compressed); - } else { - message.compressed = undefined; - } - return message; - }, -}; - -const baseLeafOp: object = { - hash: 0, - prehashKey: 0, - prehashValue: 0, - length: 0, -}; - -export const LeafOp = { - encode(message: LeafOp, writer: Writer = Writer.create()): Writer { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prehashKey !== 0) { - writer.uint32(16).int32(message.prehashKey); - } - if (message.prehashValue !== 0) { - writer.uint32(24).int32(message.prehashValue); - } - if (message.length !== 0) { - writer.uint32(32).int32(message.length); - } - if (message.prefix.length !== 0) { - writer.uint32(42).bytes(message.prefix); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LeafOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLeafOp } as LeafOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32() as any; - break; - case 2: - message.prehashKey = reader.int32() as any; - break; - case 3: - message.prehashValue = reader.int32() as any; - break; - case 4: - message.length = reader.int32() as any; - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LeafOp { - const message = { ...baseLeafOp } as LeafOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } else { - message.hash = 0; - } - if (object.prehashKey !== undefined && object.prehashKey !== null) { - message.prehashKey = hashOpFromJSON(object.prehashKey); - } else { - message.prehashKey = 0; - } - if (object.prehashValue !== undefined && object.prehashValue !== null) { - message.prehashValue = hashOpFromJSON(object.prehashValue); - } else { - message.prehashValue = 0; - } - if (object.length !== undefined && object.length !== null) { - message.length = lengthOpFromJSON(object.length); - } else { - message.length = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = bytesFromBase64(object.prefix); - } - return message; - }, - - toJSON(message: LeafOp): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prehashKey !== undefined && - (obj.prehashKey = hashOpToJSON(message.prehashKey)); - message.prehashValue !== undefined && - (obj.prehashValue = hashOpToJSON(message.prehashValue)); - message.length !== undefined && - (obj.length = lengthOpToJSON(message.length)); - message.prefix !== undefined && - (obj.prefix = base64FromBytes( - message.prefix !== undefined ? message.prefix : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): LeafOp { - const message = { ...baseLeafOp } as LeafOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = 0; - } - if (object.prehashKey !== undefined && object.prehashKey !== null) { - message.prehashKey = object.prehashKey; - } else { - message.prehashKey = 0; - } - if (object.prehashValue !== undefined && object.prehashValue !== null) { - message.prehashValue = object.prehashValue; - } else { - message.prehashValue = 0; - } - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } else { - message.length = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = object.prefix; - } else { - message.prefix = new Uint8Array(); - } - return message; - }, -}; - -const baseInnerOp: object = { hash: 0 }; - -export const InnerOp = { - encode(message: InnerOp, writer: Writer = Writer.create()): Writer { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prefix.length !== 0) { - writer.uint32(18).bytes(message.prefix); - } - if (message.suffix.length !== 0) { - writer.uint32(26).bytes(message.suffix); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): InnerOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInnerOp } as InnerOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32() as any; - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InnerOp { - const message = { ...baseInnerOp } as InnerOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } else { - message.hash = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = bytesFromBase64(object.prefix); - } - if (object.suffix !== undefined && object.suffix !== null) { - message.suffix = bytesFromBase64(object.suffix); - } - return message; - }, - - toJSON(message: InnerOp): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prefix !== undefined && - (obj.prefix = base64FromBytes( - message.prefix !== undefined ? message.prefix : new Uint8Array() - )); - message.suffix !== undefined && - (obj.suffix = base64FromBytes( - message.suffix !== undefined ? message.suffix : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): InnerOp { - const message = { ...baseInnerOp } as InnerOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = object.prefix; - } else { - message.prefix = new Uint8Array(); - } - if (object.suffix !== undefined && object.suffix !== null) { - message.suffix = object.suffix; - } else { - message.suffix = new Uint8Array(); - } - return message; - }, -}; - -const baseProofSpec: object = { maxDepth: 0, minDepth: 0 }; - -export const ProofSpec = { - encode(message: ProofSpec, writer: Writer = Writer.create()): Writer { - if (message.leafSpec !== undefined) { - LeafOp.encode(message.leafSpec, writer.uint32(10).fork()).ldelim(); - } - if (message.innerSpec !== undefined) { - InnerSpec.encode(message.innerSpec, writer.uint32(18).fork()).ldelim(); - } - if (message.maxDepth !== 0) { - writer.uint32(24).int32(message.maxDepth); - } - if (message.minDepth !== 0) { - writer.uint32(32).int32(message.minDepth); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofSpec { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofSpec } as ProofSpec; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leafSpec = LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.innerSpec = InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.maxDepth = reader.int32(); - break; - case 4: - message.minDepth = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofSpec { - const message = { ...baseProofSpec } as ProofSpec; - if (object.leafSpec !== undefined && object.leafSpec !== null) { - message.leafSpec = LeafOp.fromJSON(object.leafSpec); - } else { - message.leafSpec = undefined; - } - if (object.innerSpec !== undefined && object.innerSpec !== null) { - message.innerSpec = InnerSpec.fromJSON(object.innerSpec); - } else { - message.innerSpec = undefined; - } - if (object.maxDepth !== undefined && object.maxDepth !== null) { - message.maxDepth = Number(object.maxDepth); - } else { - message.maxDepth = 0; - } - if (object.minDepth !== undefined && object.minDepth !== null) { - message.minDepth = Number(object.minDepth); - } else { - message.minDepth = 0; - } - return message; - }, - - toJSON(message: ProofSpec): unknown { - const obj: any = {}; - message.leafSpec !== undefined && - (obj.leafSpec = message.leafSpec - ? LeafOp.toJSON(message.leafSpec) - : undefined); - message.innerSpec !== undefined && - (obj.innerSpec = message.innerSpec - ? InnerSpec.toJSON(message.innerSpec) - : undefined); - message.maxDepth !== undefined && (obj.maxDepth = message.maxDepth); - message.minDepth !== undefined && (obj.minDepth = message.minDepth); - return obj; - }, - - fromPartial(object: DeepPartial): ProofSpec { - const message = { ...baseProofSpec } as ProofSpec; - if (object.leafSpec !== undefined && object.leafSpec !== null) { - message.leafSpec = LeafOp.fromPartial(object.leafSpec); - } else { - message.leafSpec = undefined; - } - if (object.innerSpec !== undefined && object.innerSpec !== null) { - message.innerSpec = InnerSpec.fromPartial(object.innerSpec); - } else { - message.innerSpec = undefined; - } - if (object.maxDepth !== undefined && object.maxDepth !== null) { - message.maxDepth = object.maxDepth; - } else { - message.maxDepth = 0; - } - if (object.minDepth !== undefined && object.minDepth !== null) { - message.minDepth = object.minDepth; - } else { - message.minDepth = 0; - } - return message; - }, -}; - -const baseInnerSpec: object = { - childOrder: 0, - childSize: 0, - minPrefixLength: 0, - maxPrefixLength: 0, - hash: 0, -}; - -export const InnerSpec = { - encode(message: InnerSpec, writer: Writer = Writer.create()): Writer { - writer.uint32(10).fork(); - for (const v of message.childOrder) { - writer.int32(v); - } - writer.ldelim(); - if (message.childSize !== 0) { - writer.uint32(16).int32(message.childSize); - } - if (message.minPrefixLength !== 0) { - writer.uint32(24).int32(message.minPrefixLength); - } - if (message.maxPrefixLength !== 0) { - writer.uint32(32).int32(message.maxPrefixLength); - } - if (message.emptyChild.length !== 0) { - writer.uint32(42).bytes(message.emptyChild); - } - if (message.hash !== 0) { - writer.uint32(48).int32(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): InnerSpec { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInnerSpec } as InnerSpec; - message.childOrder = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.childOrder.push(reader.int32()); - } - } else { - message.childOrder.push(reader.int32()); - } - break; - case 2: - message.childSize = reader.int32(); - break; - case 3: - message.minPrefixLength = reader.int32(); - break; - case 4: - message.maxPrefixLength = reader.int32(); - break; - case 5: - message.emptyChild = reader.bytes(); - break; - case 6: - message.hash = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InnerSpec { - const message = { ...baseInnerSpec } as InnerSpec; - message.childOrder = []; - if (object.childOrder !== undefined && object.childOrder !== null) { - for (const e of object.childOrder) { - message.childOrder.push(Number(e)); - } - } - if (object.childSize !== undefined && object.childSize !== null) { - message.childSize = Number(object.childSize); - } else { - message.childSize = 0; - } - if ( - object.minPrefixLength !== undefined && - object.minPrefixLength !== null - ) { - message.minPrefixLength = Number(object.minPrefixLength); - } else { - message.minPrefixLength = 0; - } - if ( - object.maxPrefixLength !== undefined && - object.maxPrefixLength !== null - ) { - message.maxPrefixLength = Number(object.maxPrefixLength); - } else { - message.maxPrefixLength = 0; - } - if (object.emptyChild !== undefined && object.emptyChild !== null) { - message.emptyChild = bytesFromBase64(object.emptyChild); - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } else { - message.hash = 0; - } - return message; - }, - - toJSON(message: InnerSpec): unknown { - const obj: any = {}; - if (message.childOrder) { - obj.childOrder = message.childOrder.map((e) => e); - } else { - obj.childOrder = []; - } - message.childSize !== undefined && (obj.childSize = message.childSize); - message.minPrefixLength !== undefined && - (obj.minPrefixLength = message.minPrefixLength); - message.maxPrefixLength !== undefined && - (obj.maxPrefixLength = message.maxPrefixLength); - message.emptyChild !== undefined && - (obj.emptyChild = base64FromBytes( - message.emptyChild !== undefined ? message.emptyChild : new Uint8Array() - )); - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - return obj; - }, - - fromPartial(object: DeepPartial): InnerSpec { - const message = { ...baseInnerSpec } as InnerSpec; - message.childOrder = []; - if (object.childOrder !== undefined && object.childOrder !== null) { - for (const e of object.childOrder) { - message.childOrder.push(e); - } - } - if (object.childSize !== undefined && object.childSize !== null) { - message.childSize = object.childSize; - } else { - message.childSize = 0; - } - if ( - object.minPrefixLength !== undefined && - object.minPrefixLength !== null - ) { - message.minPrefixLength = object.minPrefixLength; - } else { - message.minPrefixLength = 0; - } - if ( - object.maxPrefixLength !== undefined && - object.maxPrefixLength !== null - ) { - message.maxPrefixLength = object.maxPrefixLength; - } else { - message.maxPrefixLength = 0; - } - if (object.emptyChild !== undefined && object.emptyChild !== null) { - message.emptyChild = object.emptyChild; - } else { - message.emptyChild = new Uint8Array(); - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = 0; - } - return message; - }, -}; - -const baseBatchProof: object = {}; - -export const BatchProof = { - encode(message: BatchProof, writer: Writer = Writer.create()): Writer { - for (const v of message.entries) { - BatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BatchProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchProof } as BatchProof; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BatchProof { - const message = { ...baseBatchProof } as BatchProof; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(BatchEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: BatchProof): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? BatchEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): BatchProof { - const message = { ...baseBatchProof } as BatchProof; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(BatchEntry.fromPartial(e)); - } - } - return message; - }, -}; - -const baseBatchEntry: object = {}; - -export const BatchEntry = { - encode(message: BatchEntry, writer: Writer = Writer.create()): Writer { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode( - message.nonexist, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BatchEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchEntry } as BatchEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BatchEntry { - const message = { ...baseBatchEntry } as BatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromJSON(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromJSON(object.nonexist); - } else { - message.nonexist = undefined; - } - return message; - }, - - toJSON(message: BatchEntry): unknown { - const obj: any = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? ExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? NonExistenceProof.toJSON(message.nonexist) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BatchEntry { - const message = { ...baseBatchEntry } as BatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromPartial(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromPartial(object.nonexist); - } else { - message.nonexist = undefined; - } - return message; - }, -}; - -const baseCompressedBatchProof: object = {}; - -export const CompressedBatchProof = { - encode( - message: CompressedBatchProof, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.entries) { - CompressedBatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.lookupInners) { - InnerOp.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CompressedBatchProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompressedBatchProof } as CompressedBatchProof; - message.entries = []; - message.lookupInners = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push( - CompressedBatchEntry.decode(reader, reader.uint32()) - ); - break; - case 2: - message.lookupInners.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedBatchProof { - const message = { ...baseCompressedBatchProof } as CompressedBatchProof; - message.entries = []; - message.lookupInners = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(CompressedBatchEntry.fromJSON(e)); - } - } - if (object.lookupInners !== undefined && object.lookupInners !== null) { - for (const e of object.lookupInners) { - message.lookupInners.push(InnerOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: CompressedBatchProof): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? CompressedBatchEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - if (message.lookupInners) { - obj.lookupInners = message.lookupInners.map((e) => - e ? InnerOp.toJSON(e) : undefined - ); - } else { - obj.lookupInners = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): CompressedBatchProof { - const message = { ...baseCompressedBatchProof } as CompressedBatchProof; - message.entries = []; - message.lookupInners = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(CompressedBatchEntry.fromPartial(e)); - } - } - if (object.lookupInners !== undefined && object.lookupInners !== null) { - for (const e of object.lookupInners) { - message.lookupInners.push(InnerOp.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCompressedBatchEntry: object = {}; - -export const CompressedBatchEntry = { - encode( - message: CompressedBatchEntry, - writer: Writer = Writer.create() - ): Writer { - if (message.exist !== undefined) { - CompressedExistenceProof.encode( - message.exist, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.nonexist !== undefined) { - CompressedNonExistenceProof.encode( - message.nonexist, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CompressedBatchEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = CompressedExistenceProof.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.nonexist = CompressedNonExistenceProof.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedBatchEntry { - const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = CompressedExistenceProof.fromJSON(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = CompressedNonExistenceProof.fromJSON(object.nonexist); - } else { - message.nonexist = undefined; - } - return message; - }, - - toJSON(message: CompressedBatchEntry): unknown { - const obj: any = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? CompressedExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? CompressedNonExistenceProof.toJSON(message.nonexist) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): CompressedBatchEntry { - const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = CompressedExistenceProof.fromPartial(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = CompressedNonExistenceProof.fromPartial( - object.nonexist - ); - } else { - message.nonexist = undefined; - } - return message; - }, -}; - -const baseCompressedExistenceProof: object = { path: 0 }; - -export const CompressedExistenceProof = { - encode( - message: CompressedExistenceProof, - writer: Writer = Writer.create() - ): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CompressedExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCompressedExistenceProof, - } as CompressedExistenceProof; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedExistenceProof { - const message = { - ...baseCompressedExistenceProof, - } as CompressedExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromJSON(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - return message; - }, - - toJSON(message: CompressedExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.leaf !== undefined && - (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): CompressedExistenceProof { - const message = { - ...baseCompressedExistenceProof, - } as CompressedExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromPartial(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - return message; - }, -}; - -const baseCompressedNonExistenceProof: object = {}; - -export const CompressedNonExistenceProof = { - encode( - message: CompressedNonExistenceProof, - writer: Writer = Writer.create() - ): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - CompressedExistenceProof.encode( - message.left, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.right !== undefined) { - CompressedExistenceProof.encode( - message.right, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CompressedNonExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCompressedNonExistenceProof, - } as CompressedNonExistenceProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = CompressedExistenceProof.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.right = CompressedExistenceProof.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedNonExistenceProof { - const message = { - ...baseCompressedNonExistenceProof, - } as CompressedNonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.left !== undefined && object.left !== null) { - message.left = CompressedExistenceProof.fromJSON(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = CompressedExistenceProof.fromJSON(object.right); - } else { - message.right = undefined; - } - return message; - }, - - toJSON(message: CompressedNonExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.left !== undefined && - (obj.left = message.left - ? CompressedExistenceProof.toJSON(message.left) - : undefined); - message.right !== undefined && - (obj.right = message.right - ? CompressedExistenceProof.toJSON(message.right) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CompressedNonExistenceProof { - const message = { - ...baseCompressedNonExistenceProof, - } as CompressedNonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.left !== undefined && object.left !== null) { - message.left = CompressedExistenceProof.fromPartial(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = CompressedExistenceProof.fromPartial(object.right); - } else { - message.right = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab86448..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: number; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: number; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; -} - -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.js deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index fe98c62..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 8d000f4..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index 73fd7c6..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,996 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 2b3d027..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4123 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 15632c1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5216 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - start: number; - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * 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. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - 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: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * 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. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be used - * for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementions still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * 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. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * 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. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * 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 descendent. 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 { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * 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; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.d.ts deleted file mode 100644 index eef05fd..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} -export declare const IdentifiedClientState: { - encode(message: IdentifiedClientState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState; - fromJSON(object: any): IdentifiedClientState; - toJSON(message: IdentifiedClientState): unknown; - fromPartial(object: DeepPartial): IdentifiedClientState; -}; -export declare const ConsensusStateWithHeight: { - encode(message: ConsensusStateWithHeight, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusStateWithHeight; - fromJSON(object: any): ConsensusStateWithHeight; - toJSON(message: ConsensusStateWithHeight): unknown; - fromPartial(object: DeepPartial): ConsensusStateWithHeight; -}; -export declare const ClientConsensusStates: { - encode(message: ClientConsensusStates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates; - fromJSON(object: any): ClientConsensusStates; - toJSON(message: ClientConsensusStates): unknown; - fromPartial(object: DeepPartial): ClientConsensusStates; -}; -export declare const ClientUpdateProposal: { - encode(message: ClientUpdateProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal; - fromJSON(object: any): ClientUpdateProposal; - toJSON(message: ClientUpdateProposal): unknown; - fromPartial(object: DeepPartial): ClientUpdateProposal; -}; -export declare const Height: { - encode(message: Height, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Height; - fromJSON(object: any): Height; - toJSON(message: Height): unknown; - fromPartial(object: DeepPartial): Height; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.js deleted file mode 100644 index 52a38ad..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.js +++ /dev/null @@ -1,500 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.client.v1"; -const baseIdentifiedClientState = { clientId: "" }; -export const IdentifiedClientState = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, -}; -const baseConsensusStateWithHeight = {}; -export const ConsensusStateWithHeight = { - encode(message, writer = Writer.create()) { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, -}; -const baseClientConsensusStates = { clientId: "" }; -export const ClientConsensusStates = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } - else { - obj.consensusStates = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; -const baseClientUpdateProposal = { - title: "", - description: "", - clientId: "", -}; -export const ClientUpdateProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } - else { - message.header = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } - else { - message.header = undefined; - } - return message; - }, -}; -const baseHeight = { revisionNumber: 0, revisionHeight: 0 }; -export const Height = { - encode(message, writer = Writer.create()) { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseParams = { allowedClients: "" }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.allowedClients) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } - else { - obj.allowedClients = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index 7ca2f60..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,624 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} - -/** ConsensusStateWithHeight defines a consensus state with an additional height field. */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the client is - * updated with the provided header. The update may fail if the header is not - * valid given certain conditions specified by the client implementation. - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - clientId: string; - /** the header used to update the client if the proposal passes */ - header: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber - * the same. However some consensus algorithms may choose to reset the - * height in certain conditions e.g. hard forks, state-machine breaking changes - * In these cases, the RevisionNumber is incremented so that height continues to - * be monitonically increasing even as the RevisionHeight gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} - -const baseIdentifiedClientState: object = { clientId: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { clientId: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensusStates = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - clientId: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.clientId !== "") { - writer.uint32(26).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.clientId = reader.string(); - break; - case 4: - message.header = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } else { - message.header = undefined; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } else { - message.header = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revisionNumber: 0, revisionHeight: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseParams: object = { allowedClients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowedClients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } else { - obj.allowedClients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.d.ts deleted file mode 100644 index 15f5389..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { CommitmentProof } from "../../../../confio/proofs"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ibc.core.commitment.v1"; -/** - * MerkleRoot defines a merkle root hash. - * In the Cosmos SDK, the AppHash of a block header becomes the root. - */ -export interface MerkleRoot { - hash: Uint8Array; -} -/** - * MerklePrefix is merkle path prefixed to the key. - * The constructed key from the Path and the key will be append(Path.KeyPath, - * append(Path.KeyPrefix, key...)) - */ -export interface MerklePrefix { - keyPrefix: Uint8Array; -} -/** - * MerklePath is the path used to verify commitment proofs, which can be an - * arbitrary structured object (defined by a commitment type). - * MerklePath is represented from root-to-leaf - */ -export interface MerklePath { - keyPath: string[]; -} -/** - * MerkleProof is a wrapper type over a chain of CommitmentProofs. - * It demonstrates membership or non-membership for an element or set of - * elements, verifiable in conjunction with a known commitment root. Proofs - * should be succinct. - * MerkleProofs are ordered from leaf-to-root - */ -export interface MerkleProof { - proofs: CommitmentProof[]; -} -export declare const MerkleRoot: { - encode(message: MerkleRoot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MerkleRoot; - fromJSON(object: any): MerkleRoot; - toJSON(message: MerkleRoot): unknown; - fromPartial(object: DeepPartial): MerkleRoot; -}; -export declare const MerklePrefix: { - encode(message: MerklePrefix, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MerklePrefix; - fromJSON(object: any): MerklePrefix; - toJSON(message: MerklePrefix): unknown; - fromPartial(object: DeepPartial): MerklePrefix; -}; -export declare const MerklePath: { - encode(message: MerklePath, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MerklePath; - fromJSON(object: any): MerklePath; - toJSON(message: MerklePath): unknown; - fromPartial(object: DeepPartial): MerklePath; -}; -export declare const MerkleProof: { - encode(message: MerkleProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MerkleProof; - fromJSON(object: any): MerkleProof; - toJSON(message: MerkleProof): unknown; - fromPartial(object: DeepPartial): MerkleProof; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.js deleted file mode 100644 index 3257a67..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.js +++ /dev/null @@ -1,246 +0,0 @@ -/* eslint-disable */ -import { CommitmentProof } from "../../../../confio/proofs"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ibc.core.commitment.v1"; -const baseMerkleRoot = {}; -export const MerkleRoot = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerkleRoot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMerkleRoot }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseMerkleRoot }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -const baseMerklePrefix = {}; -export const MerklePrefix = { - encode(message, writer = Writer.create()) { - if (message.keyPrefix.length !== 0) { - writer.uint32(10).bytes(message.keyPrefix); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerklePrefix }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyPrefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMerklePrefix }; - if (object.keyPrefix !== undefined && object.keyPrefix !== null) { - message.keyPrefix = bytesFromBase64(object.keyPrefix); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.keyPrefix !== undefined && - (obj.keyPrefix = base64FromBytes(message.keyPrefix !== undefined ? message.keyPrefix : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseMerklePrefix }; - if (object.keyPrefix !== undefined && object.keyPrefix !== null) { - message.keyPrefix = object.keyPrefix; - } - else { - message.keyPrefix = new Uint8Array(); - } - return message; - }, -}; -const baseMerklePath = { keyPath: "" }; -export const MerklePath = { - encode(message, writer = Writer.create()) { - for (const v of message.keyPath) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerklePath }; - message.keyPath = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyPath.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMerklePath }; - message.keyPath = []; - if (object.keyPath !== undefined && object.keyPath !== null) { - for (const e of object.keyPath) { - message.keyPath.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.keyPath) { - obj.keyPath = message.keyPath.map((e) => e); - } - else { - obj.keyPath = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMerklePath }; - message.keyPath = []; - if (object.keyPath !== undefined && object.keyPath !== null) { - for (const e of object.keyPath) { - message.keyPath.push(e); - } - } - return message; - }, -}; -const baseMerkleProof = {}; -export const MerkleProof = { - encode(message, writer = Writer.create()) { - for (const v of message.proofs) { - CommitmentProof.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerkleProof }; - message.proofs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proofs.push(CommitmentProof.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMerkleProof }; - message.proofs = []; - if (object.proofs !== undefined && object.proofs !== null) { - for (const e of object.proofs) { - message.proofs.push(CommitmentProof.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.proofs) { - obj.proofs = message.proofs.map((e) => e ? CommitmentProof.toJSON(e) : undefined); - } - else { - obj.proofs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMerkleProof }; - message.proofs = []; - if (object.proofs !== undefined && object.proofs !== null) { - for (const e of object.proofs) { - message.proofs.push(CommitmentProof.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts deleted file mode 100644 index 98117ad..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts +++ /dev/null @@ -1,324 +0,0 @@ -/* eslint-disable */ -import { CommitmentProof } from "../../../../confio/proofs"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.core.commitment.v1"; - -/** - * MerkleRoot defines a merkle root hash. - * In the Cosmos SDK, the AppHash of a block header becomes the root. - */ -export interface MerkleRoot { - hash: Uint8Array; -} - -/** - * MerklePrefix is merkle path prefixed to the key. - * The constructed key from the Path and the key will be append(Path.KeyPath, - * append(Path.KeyPrefix, key...)) - */ -export interface MerklePrefix { - keyPrefix: Uint8Array; -} - -/** - * MerklePath is the path used to verify commitment proofs, which can be an - * arbitrary structured object (defined by a commitment type). - * MerklePath is represented from root-to-leaf - */ -export interface MerklePath { - keyPath: string[]; -} - -/** - * MerkleProof is a wrapper type over a chain of CommitmentProofs. - * It demonstrates membership or non-membership for an element or set of - * elements, verifiable in conjunction with a known commitment root. Proofs - * should be succinct. - * MerkleProofs are ordered from leaf-to-root - */ -export interface MerkleProof { - proofs: CommitmentProof[]; -} - -const baseMerkleRoot: object = {}; - -export const MerkleRoot = { - encode(message: MerkleRoot, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerkleRoot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerkleRoot } as MerkleRoot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerkleRoot { - const message = { ...baseMerkleRoot } as MerkleRoot; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: MerkleRoot): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MerkleRoot { - const message = { ...baseMerkleRoot } as MerkleRoot; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const baseMerklePrefix: object = {}; - -export const MerklePrefix = { - encode(message: MerklePrefix, writer: Writer = Writer.create()): Writer { - if (message.keyPrefix.length !== 0) { - writer.uint32(10).bytes(message.keyPrefix); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerklePrefix { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerklePrefix } as MerklePrefix; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyPrefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerklePrefix { - const message = { ...baseMerklePrefix } as MerklePrefix; - if (object.keyPrefix !== undefined && object.keyPrefix !== null) { - message.keyPrefix = bytesFromBase64(object.keyPrefix); - } - return message; - }, - - toJSON(message: MerklePrefix): unknown { - const obj: any = {}; - message.keyPrefix !== undefined && - (obj.keyPrefix = base64FromBytes( - message.keyPrefix !== undefined ? message.keyPrefix : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MerklePrefix { - const message = { ...baseMerklePrefix } as MerklePrefix; - if (object.keyPrefix !== undefined && object.keyPrefix !== null) { - message.keyPrefix = object.keyPrefix; - } else { - message.keyPrefix = new Uint8Array(); - } - return message; - }, -}; - -const baseMerklePath: object = { keyPath: "" }; - -export const MerklePath = { - encode(message: MerklePath, writer: Writer = Writer.create()): Writer { - for (const v of message.keyPath) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerklePath { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerklePath } as MerklePath; - message.keyPath = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyPath.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerklePath { - const message = { ...baseMerklePath } as MerklePath; - message.keyPath = []; - if (object.keyPath !== undefined && object.keyPath !== null) { - for (const e of object.keyPath) { - message.keyPath.push(String(e)); - } - } - return message; - }, - - toJSON(message: MerklePath): unknown { - const obj: any = {}; - if (message.keyPath) { - obj.keyPath = message.keyPath.map((e) => e); - } else { - obj.keyPath = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MerklePath { - const message = { ...baseMerklePath } as MerklePath; - message.keyPath = []; - if (object.keyPath !== undefined && object.keyPath !== null) { - for (const e of object.keyPath) { - message.keyPath.push(e); - } - } - return message; - }, -}; - -const baseMerkleProof: object = {}; - -export const MerkleProof = { - encode(message: MerkleProof, writer: Writer = Writer.create()): Writer { - for (const v of message.proofs) { - CommitmentProof.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerkleProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerkleProof } as MerkleProof; - message.proofs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proofs.push(CommitmentProof.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerkleProof { - const message = { ...baseMerkleProof } as MerkleProof; - message.proofs = []; - if (object.proofs !== undefined && object.proofs !== null) { - for (const e of object.proofs) { - message.proofs.push(CommitmentProof.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MerkleProof): unknown { - const obj: any = {}; - if (message.proofs) { - obj.proofs = message.proofs.map((e) => - e ? CommitmentProof.toJSON(e) : undefined - ); - } else { - obj.proofs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MerkleProof { - const message = { ...baseMerkleProof } as MerkleProof; - message.proofs = []; - if (object.proofs !== undefined && object.proofs !== null) { - for (const e of object.proofs) { - message.proofs.push(CommitmentProof.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.d.ts deleted file mode 100644 index 01dca9f..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { MerklePrefix } from "../../../../ibc/core/commitment/v1/commitment"; -export declare const protobufPackage = "ibc.core.connection.v1"; -/** - * State defines if a connection is in one of the following states: - * INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export declare enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A connection end has just started the opening handshake. */ - STATE_INIT = 1, - /** - * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty - * chain. - */ - STATE_TRYOPEN = 2, - /** STATE_OPEN - A connection end has completed the handshake. */ - STATE_OPEN = 3, - UNRECOGNIZED = -1 -} -export declare function stateFromJSON(object: any): State; -export declare function stateToJSON(object: State): string; -/** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ -export interface ConnectionEnd { - /** client associated with this connection. */ - clientId: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** - * delay period that must pass before a consensus state can be used for packet-verification - * NOTE: delay period logic is only implemented by some clients. - */ - delayPeriod: number; -} -/** - * IdentifiedConnection defines a connection with additional connection - * identifier field. - */ -export interface IdentifiedConnection { - /** connection identifier. */ - id: string; - /** client associated with this connection. */ - clientId: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** delay period associated with this connection. */ - delayPeriod: number; -} -/** Counterparty defines the counterparty chain associated with a connection end. */ -export interface Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - clientId: string; - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connectionId: string; - /** commitment merkle prefix of the counterparty chain. */ - prefix: MerklePrefix | undefined; -} -/** ClientPaths define all the connection paths for a client state. */ -export interface ClientPaths { - /** list of connection paths */ - paths: string[]; -} -/** ConnectionPaths define all the connection paths for a given client state. */ -export interface ConnectionPaths { - /** client state unique identifier */ - clientId: string; - /** list of connection paths */ - paths: string[]; -} -/** - * Version defines the versioning scheme used to negotiate the IBC verison in - * the connection handshake. - */ -export interface Version { - /** unique version identifier */ - identifier: string; - /** list of features compatible with the specified identifier */ - features: string[]; -} -export declare const ConnectionEnd: { - encode(message: ConnectionEnd, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConnectionEnd; - fromJSON(object: any): ConnectionEnd; - toJSON(message: ConnectionEnd): unknown; - fromPartial(object: DeepPartial): ConnectionEnd; -}; -export declare const IdentifiedConnection: { - encode(message: IdentifiedConnection, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedConnection; - fromJSON(object: any): IdentifiedConnection; - toJSON(message: IdentifiedConnection): unknown; - fromPartial(object: DeepPartial): IdentifiedConnection; -}; -export declare const Counterparty: { - encode(message: Counterparty, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Counterparty; - fromJSON(object: any): Counterparty; - toJSON(message: Counterparty): unknown; - fromPartial(object: DeepPartial): Counterparty; -}; -export declare const ClientPaths: { - encode(message: ClientPaths, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientPaths; - fromJSON(object: any): ClientPaths; - toJSON(message: ClientPaths): unknown; - fromPartial(object: DeepPartial): ClientPaths; -}; -export declare const ConnectionPaths: { - encode(message: ConnectionPaths, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConnectionPaths; - fromJSON(object: any): ConnectionPaths; - toJSON(message: ConnectionPaths): unknown; - fromPartial(object: DeepPartial): ConnectionPaths; -}; -export declare const Version: { - encode(message: Version, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Version; - fromJSON(object: any): Version; - toJSON(message: Version): unknown; - fromPartial(object: DeepPartial): Version; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.js deleted file mode 100644 index 7e167f8..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.js +++ /dev/null @@ -1,679 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { MerklePrefix } from "../../../../ibc/core/commitment/v1/commitment"; -export const protobufPackage = "ibc.core.connection.v1"; -/** - * State defines if a connection is in one of the following states: - * INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export var State; -(function (State) { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - State[State["STATE_UNINITIALIZED_UNSPECIFIED"] = 0] = "STATE_UNINITIALIZED_UNSPECIFIED"; - /** STATE_INIT - A connection end has just started the opening handshake. */ - State[State["STATE_INIT"] = 1] = "STATE_INIT"; - /** - * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty - * chain. - */ - State[State["STATE_TRYOPEN"] = 2] = "STATE_TRYOPEN"; - /** STATE_OPEN - A connection end has completed the handshake. */ - State[State["STATE_OPEN"] = 3] = "STATE_OPEN"; - State[State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(State || (State = {})); -export function stateFromJSON(object) { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} -export function stateToJSON(object) { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - default: - return "UNKNOWN"; - } -} -const baseConnectionEnd = { clientId: "", state: 0, delayPeriod: 0 }; -export const ConnectionEnd = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.versions) { - Version.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(24).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(34).fork()).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(40).uint64(message.delayPeriod); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConnectionEnd }; - message.versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConnectionEnd }; - message.versions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromJSON(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } - else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } - else { - message.delayPeriod = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.versions) { - obj.versions = message.versions.map((e) => e ? Version.toJSON(e) : undefined); - } - else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - return obj; - }, - fromPartial(object) { - const message = { ...baseConnectionEnd }; - message.versions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromPartial(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } - else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } - else { - message.delayPeriod = 0; - } - return message; - }, -}; -const baseIdentifiedConnection = { - id: "", - clientId: "", - state: 0, - delayPeriod: 0, -}; -export const IdentifiedConnection = { - encode(message, writer = Writer.create()) { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - for (const v of message.versions) { - Version.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(32).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(42).fork()).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(48).uint64(message.delayPeriod); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedConnection }; - message.versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delayPeriod = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedConnection }; - message.versions = []; - if (object.id !== undefined && object.id !== null) { - message.id = String(object.id); - } - else { - message.id = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromJSON(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } - else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } - else { - message.delayPeriod = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.id !== undefined && (obj.id = message.id); - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.versions) { - obj.versions = message.versions.map((e) => e ? Version.toJSON(e) : undefined); - } - else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedConnection }; - message.versions = []; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } - else { - message.id = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromPartial(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } - else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } - else { - message.delayPeriod = 0; - } - return message; - }, -}; -const baseCounterparty = { clientId: "", connectionId: "" }; -export const Counterparty = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.connectionId !== "") { - writer.uint32(18).string(message.connectionId); - } - if (message.prefix !== undefined) { - MerklePrefix.encode(message.prefix, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCounterparty }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.connectionId = reader.string(); - break; - case 3: - message.prefix = MerklePrefix.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCounterparty }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } - else { - message.connectionId = ""; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = MerklePrefix.fromJSON(object.prefix); - } - else { - message.prefix = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.prefix !== undefined && - (obj.prefix = message.prefix - ? MerklePrefix.toJSON(message.prefix) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseCounterparty }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } - else { - message.connectionId = ""; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = MerklePrefix.fromPartial(object.prefix); - } - else { - message.prefix = undefined; - } - return message; - }, -}; -const baseClientPaths = { paths: "" }; -export const ClientPaths = { - encode(message, writer = Writer.create()) { - for (const v of message.paths) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientPaths }; - message.paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientPaths }; - message.paths = []; - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.paths) { - obj.paths = message.paths.map((e) => e); - } - else { - obj.paths = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseClientPaths }; - message.paths = []; - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(e); - } - } - return message; - }, -}; -const baseConnectionPaths = { clientId: "", paths: "" }; -export const ConnectionPaths = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.paths) { - writer.uint32(18).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConnectionPaths }; - message.paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConnectionPaths }; - message.paths = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.paths) { - obj.paths = message.paths.map((e) => e); - } - else { - obj.paths = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseConnectionPaths }; - message.paths = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(e); - } - } - return message; - }, -}; -const baseVersion = { identifier: "", features: "" }; -export const Version = { - encode(message, writer = Writer.create()) { - if (message.identifier !== "") { - writer.uint32(10).string(message.identifier); - } - for (const v of message.features) { - writer.uint32(18).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersion }; - message.features = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVersion }; - message.features = []; - if (object.identifier !== undefined && object.identifier !== null) { - message.identifier = String(object.identifier); - } - else { - message.identifier = ""; - } - if (object.features !== undefined && object.features !== null) { - for (const e of object.features) { - message.features.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.identifier !== undefined && (obj.identifier = message.identifier); - if (message.features) { - obj.features = message.features.map((e) => e); - } - else { - obj.features = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseVersion }; - message.features = []; - if (object.identifier !== undefined && object.identifier !== null) { - message.identifier = object.identifier; - } - else { - message.identifier = ""; - } - if (object.features !== undefined && object.features !== null) { - for (const e of object.features) { - message.features.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts deleted file mode 100644 index 9bbee91..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts +++ /dev/null @@ -1,798 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { MerklePrefix } from "../../../../ibc/core/commitment/v1/commitment"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** - * State defines if a connection is in one of the following states: - * INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A connection end has just started the opening handshake. */ - STATE_INIT = 1, - /** - * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty - * chain. - */ - STATE_TRYOPEN = 2, - /** STATE_OPEN - A connection end has completed the handshake. */ - STATE_OPEN = 3, - UNRECOGNIZED = -1, -} - -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} - -export function stateToJSON(object: State): string { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - default: - return "UNKNOWN"; - } -} - -/** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ -export interface ConnectionEnd { - /** client associated with this connection. */ - clientId: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** - * delay period that must pass before a consensus state can be used for packet-verification - * NOTE: delay period logic is only implemented by some clients. - */ - delayPeriod: number; -} - -/** - * IdentifiedConnection defines a connection with additional connection - * identifier field. - */ -export interface IdentifiedConnection { - /** connection identifier. */ - id: string; - /** client associated with this connection. */ - clientId: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** delay period associated with this connection. */ - delayPeriod: number; -} - -/** Counterparty defines the counterparty chain associated with a connection end. */ -export interface Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - clientId: string; - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connectionId: string; - /** commitment merkle prefix of the counterparty chain. */ - prefix: MerklePrefix | undefined; -} - -/** ClientPaths define all the connection paths for a client state. */ -export interface ClientPaths { - /** list of connection paths */ - paths: string[]; -} - -/** ConnectionPaths define all the connection paths for a given client state. */ -export interface ConnectionPaths { - /** client state unique identifier */ - clientId: string; - /** list of connection paths */ - paths: string[]; -} - -/** - * Version defines the versioning scheme used to negotiate the IBC verison in - * the connection handshake. - */ -export interface Version { - /** unique version identifier */ - identifier: string; - /** list of features compatible with the specified identifier */ - features: string[]; -} - -const baseConnectionEnd: object = { clientId: "", state: 0, delayPeriod: 0 }; - -export const ConnectionEnd = { - encode(message: ConnectionEnd, writer: Writer = Writer.create()): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.versions) { - Version.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(24).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(40).uint64(message.delayPeriod); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConnectionEnd { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConnectionEnd } as ConnectionEnd; - message.versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32() as any; - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConnectionEnd { - const message = { ...baseConnectionEnd } as ConnectionEnd; - message.versions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromJSON(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } else { - message.delayPeriod = 0; - } - return message; - }, - - toJSON(message: ConnectionEnd): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.versions) { - obj.versions = message.versions.map((e) => - e ? Version.toJSON(e) : undefined - ); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - return obj; - }, - - fromPartial(object: DeepPartial): ConnectionEnd { - const message = { ...baseConnectionEnd } as ConnectionEnd; - message.versions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromPartial(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } else { - message.delayPeriod = 0; - } - return message; - }, -}; - -const baseIdentifiedConnection: object = { - id: "", - clientId: "", - state: 0, - delayPeriod: 0, -}; - -export const IdentifiedConnection = { - encode( - message: IdentifiedConnection, - writer: Writer = Writer.create() - ): Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - for (const v of message.versions) { - Version.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(32).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(48).uint64(message.delayPeriod); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedConnection { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedConnection } as IdentifiedConnection; - message.versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = reader.int32() as any; - break; - case 5: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delayPeriod = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedConnection { - const message = { ...baseIdentifiedConnection } as IdentifiedConnection; - message.versions = []; - if (object.id !== undefined && object.id !== null) { - message.id = String(object.id); - } else { - message.id = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromJSON(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } else { - message.delayPeriod = 0; - } - return message; - }, - - toJSON(message: IdentifiedConnection): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.versions) { - obj.versions = message.versions.map((e) => - e ? Version.toJSON(e) : undefined - ); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - return obj; - }, - - fromPartial(object: DeepPartial): IdentifiedConnection { - const message = { ...baseIdentifiedConnection } as IdentifiedConnection; - message.versions = []; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } else { - message.id = ""; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromPartial(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } else { - message.delayPeriod = 0; - } - return message; - }, -}; - -const baseCounterparty: object = { clientId: "", connectionId: "" }; - -export const Counterparty = { - encode(message: Counterparty, writer: Writer = Writer.create()): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.connectionId !== "") { - writer.uint32(18).string(message.connectionId); - } - if (message.prefix !== undefined) { - MerklePrefix.encode(message.prefix, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Counterparty { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCounterparty } as Counterparty; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.connectionId = reader.string(); - break; - case 3: - message.prefix = MerklePrefix.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } else { - message.connectionId = ""; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = MerklePrefix.fromJSON(object.prefix); - } else { - message.prefix = undefined; - } - return message; - }, - - toJSON(message: Counterparty): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.prefix !== undefined && - (obj.prefix = message.prefix - ? MerklePrefix.toJSON(message.prefix) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } else { - message.connectionId = ""; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = MerklePrefix.fromPartial(object.prefix); - } else { - message.prefix = undefined; - } - return message; - }, -}; - -const baseClientPaths: object = { paths: "" }; - -export const ClientPaths = { - encode(message: ClientPaths, writer: Writer = Writer.create()): Writer { - for (const v of message.paths) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientPaths { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientPaths } as ClientPaths; - message.paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientPaths { - const message = { ...baseClientPaths } as ClientPaths; - message.paths = []; - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(String(e)); - } - } - return message; - }, - - toJSON(message: ClientPaths): unknown { - const obj: any = {}; - if (message.paths) { - obj.paths = message.paths.map((e) => e); - } else { - obj.paths = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ClientPaths { - const message = { ...baseClientPaths } as ClientPaths; - message.paths = []; - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(e); - } - } - return message; - }, -}; - -const baseConnectionPaths: object = { clientId: "", paths: "" }; - -export const ConnectionPaths = { - encode(message: ConnectionPaths, writer: Writer = Writer.create()): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.paths) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConnectionPaths { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConnectionPaths } as ConnectionPaths; - message.paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConnectionPaths { - const message = { ...baseConnectionPaths } as ConnectionPaths; - message.paths = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(String(e)); - } - } - return message; - }, - - toJSON(message: ConnectionPaths): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.paths) { - obj.paths = message.paths.map((e) => e); - } else { - obj.paths = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ConnectionPaths { - const message = { ...baseConnectionPaths } as ConnectionPaths; - message.paths = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(e); - } - } - return message; - }, -}; - -const baseVersion: object = { identifier: "", features: "" }; - -export const Version = { - encode(message: Version, writer: Writer = Writer.create()): Writer { - if (message.identifier !== "") { - writer.uint32(10).string(message.identifier); - } - for (const v of message.features) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Version { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersion } as Version; - message.features = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Version { - const message = { ...baseVersion } as Version; - message.features = []; - if (object.identifier !== undefined && object.identifier !== null) { - message.identifier = String(object.identifier); - } else { - message.identifier = ""; - } - if (object.features !== undefined && object.features !== null) { - for (const e of object.features) { - message.features.push(String(e)); - } - } - return message; - }, - - toJSON(message: Version): unknown { - const obj: any = {}; - message.identifier !== undefined && (obj.identifier = message.identifier); - if (message.features) { - obj.features = message.features.map((e) => e); - } else { - obj.features = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Version { - const message = { ...baseVersion } as Version; - message.features = []; - if (object.identifier !== undefined && object.identifier !== null) { - message.identifier = object.identifier; - } else { - message.identifier = ""; - } - if (object.features !== undefined && object.features !== null) { - for (const e of object.features) { - message.features.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.d.ts deleted file mode 100644 index b3ebc55..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { IdentifiedConnection, ConnectionPaths } from "../../../../ibc/core/connection/v1/connection"; -export declare const protobufPackage = "ibc.core.connection.v1"; -/** GenesisState defines the ibc connection submodule's genesis state. */ -export interface GenesisState { - connections: IdentifiedConnection[]; - clientConnectionPaths: ConnectionPaths[]; - /** the sequence for the next generated connection identifier */ - nextConnectionSequence: number; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.js deleted file mode 100644 index eb028d5..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.js +++ /dev/null @@ -1,132 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { IdentifiedConnection, ConnectionPaths, } from "../../../../ibc/core/connection/v1/connection"; -export const protobufPackage = "ibc.core.connection.v1"; -const baseGenesisState = { nextConnectionSequence: 0 }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.connections) { - IdentifiedConnection.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clientConnectionPaths) { - ConnectionPaths.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.nextConnectionSequence !== 0) { - writer.uint32(24).uint64(message.nextConnectionSequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.connections = []; - message.clientConnectionPaths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push(IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - message.clientConnectionPaths.push(ConnectionPaths.decode(reader, reader.uint32())); - break; - case 3: - message.nextConnectionSequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.connections = []; - message.clientConnectionPaths = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromJSON(e)); - } - } - if (object.clientConnectionPaths !== undefined && - object.clientConnectionPaths !== null) { - for (const e of object.clientConnectionPaths) { - message.clientConnectionPaths.push(ConnectionPaths.fromJSON(e)); - } - } - if (object.nextConnectionSequence !== undefined && - object.nextConnectionSequence !== null) { - message.nextConnectionSequence = Number(object.nextConnectionSequence); - } - else { - message.nextConnectionSequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.connections) { - obj.connections = message.connections.map((e) => e ? IdentifiedConnection.toJSON(e) : undefined); - } - else { - obj.connections = []; - } - if (message.clientConnectionPaths) { - obj.clientConnectionPaths = message.clientConnectionPaths.map((e) => e ? ConnectionPaths.toJSON(e) : undefined); - } - else { - obj.clientConnectionPaths = []; - } - message.nextConnectionSequence !== undefined && - (obj.nextConnectionSequence = message.nextConnectionSequence); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.connections = []; - message.clientConnectionPaths = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromPartial(e)); - } - } - if (object.clientConnectionPaths !== undefined && - object.clientConnectionPaths !== null) { - for (const e of object.clientConnectionPaths) { - message.clientConnectionPaths.push(ConnectionPaths.fromPartial(e)); - } - } - if (object.nextConnectionSequence !== undefined && - object.nextConnectionSequence !== null) { - message.nextConnectionSequence = object.nextConnectionSequence; - } - else { - message.nextConnectionSequence = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts deleted file mode 100644 index bc4bc8a..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - IdentifiedConnection, - ConnectionPaths, -} from "../../../../ibc/core/connection/v1/connection"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** GenesisState defines the ibc connection submodule's genesis state. */ -export interface GenesisState { - connections: IdentifiedConnection[]; - clientConnectionPaths: ConnectionPaths[]; - /** the sequence for the next generated connection identifier */ - nextConnectionSequence: number; -} - -const baseGenesisState: object = { nextConnectionSequence: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.connections) { - IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clientConnectionPaths) { - ConnectionPaths.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.nextConnectionSequence !== 0) { - writer.uint32(24).uint64(message.nextConnectionSequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.connections = []; - message.clientConnectionPaths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push( - IdentifiedConnection.decode(reader, reader.uint32()) - ); - break; - case 2: - message.clientConnectionPaths.push( - ConnectionPaths.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nextConnectionSequence = longToNumber( - reader.uint64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.connections = []; - message.clientConnectionPaths = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromJSON(e)); - } - } - if ( - object.clientConnectionPaths !== undefined && - object.clientConnectionPaths !== null - ) { - for (const e of object.clientConnectionPaths) { - message.clientConnectionPaths.push(ConnectionPaths.fromJSON(e)); - } - } - if ( - object.nextConnectionSequence !== undefined && - object.nextConnectionSequence !== null - ) { - message.nextConnectionSequence = Number(object.nextConnectionSequence); - } else { - message.nextConnectionSequence = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map((e) => - e ? IdentifiedConnection.toJSON(e) : undefined - ); - } else { - obj.connections = []; - } - if (message.clientConnectionPaths) { - obj.clientConnectionPaths = message.clientConnectionPaths.map((e) => - e ? ConnectionPaths.toJSON(e) : undefined - ); - } else { - obj.clientConnectionPaths = []; - } - message.nextConnectionSequence !== undefined && - (obj.nextConnectionSequence = message.nextConnectionSequence); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.connections = []; - message.clientConnectionPaths = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromPartial(e)); - } - } - if ( - object.clientConnectionPaths !== undefined && - object.clientConnectionPaths !== null - ) { - for (const e of object.clientConnectionPaths) { - message.clientConnectionPaths.push(ConnectionPaths.fromPartial(e)); - } - } - if ( - object.nextConnectionSequence !== undefined && - object.nextConnectionSequence !== null - ) { - message.nextConnectionSequence = object.nextConnectionSequence; - } else { - message.nextConnectionSequence = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.d.ts deleted file mode 100644 index ba295d3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.d.ts +++ /dev/null @@ -1,219 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { ConnectionEnd, IdentifiedConnection } from "../../../../ibc/core/connection/v1/connection"; -import { Height, IdentifiedClientState } from "../../../../ibc/core/client/v1/client"; -import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -export declare const protobufPackage = "ibc.core.connection.v1"; -/** - * QueryConnectionRequest is the request type for the Query/Connection RPC - * method - */ -export interface QueryConnectionRequest { - /** connection unique identifier */ - connectionId: string; -} -/** - * QueryConnectionResponse is the response type for the Query/Connection RPC - * method. Besides the connection end, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryConnectionResponse { - /** connection associated with the request identifier */ - connection: ConnectionEnd | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryConnectionsRequest is the request type for the Query/Connections RPC - * method - */ -export interface QueryConnectionsRequest { - pagination: PageRequest | undefined; -} -/** - * QueryConnectionsResponse is the response type for the Query/Connections RPC - * method. - */ -export interface QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections: IdentifiedConnection[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -/** - * QueryClientConnectionsRequest is the request type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsRequest { - /** client identifier associated with a connection */ - clientId: string; -} -/** - * QueryClientConnectionsResponse is the response type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connectionPaths: string[]; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was generated */ - proofHeight: Height | undefined; -} -/** - * QueryConnectionClientStateRequest is the request type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateRequest { - /** connection identifier */ - connectionId: string; -} -/** - * QueryConnectionClientStateResponse is the response type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateResponse { - /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -/** - * QueryConnectionConsensusStateRequest is the request type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateRequest { - /** connection identifier */ - connectionId: string; - revisionNumber: number; - revisionHeight: number; -} -/** - * QueryConnectionConsensusStateResponse is the response type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateResponse { - /** consensus state associated with the channel */ - consensusState: Any | undefined; - /** client ID associated with the consensus state */ - clientId: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export declare const QueryConnectionRequest: { - encode(message: QueryConnectionRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionRequest; - fromJSON(object: any): QueryConnectionRequest; - toJSON(message: QueryConnectionRequest): unknown; - fromPartial(object: DeepPartial): QueryConnectionRequest; -}; -export declare const QueryConnectionResponse: { - encode(message: QueryConnectionResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionResponse; - fromJSON(object: any): QueryConnectionResponse; - toJSON(message: QueryConnectionResponse): unknown; - fromPartial(object: DeepPartial): QueryConnectionResponse; -}; -export declare const QueryConnectionsRequest: { - encode(message: QueryConnectionsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionsRequest; - fromJSON(object: any): QueryConnectionsRequest; - toJSON(message: QueryConnectionsRequest): unknown; - fromPartial(object: DeepPartial): QueryConnectionsRequest; -}; -export declare const QueryConnectionsResponse: { - encode(message: QueryConnectionsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionsResponse; - fromJSON(object: any): QueryConnectionsResponse; - toJSON(message: QueryConnectionsResponse): unknown; - fromPartial(object: DeepPartial): QueryConnectionsResponse; -}; -export declare const QueryClientConnectionsRequest: { - encode(message: QueryClientConnectionsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientConnectionsRequest; - fromJSON(object: any): QueryClientConnectionsRequest; - toJSON(message: QueryClientConnectionsRequest): unknown; - fromPartial(object: DeepPartial): QueryClientConnectionsRequest; -}; -export declare const QueryClientConnectionsResponse: { - encode(message: QueryClientConnectionsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryClientConnectionsResponse; - fromJSON(object: any): QueryClientConnectionsResponse; - toJSON(message: QueryClientConnectionsResponse): unknown; - fromPartial(object: DeepPartial): QueryClientConnectionsResponse; -}; -export declare const QueryConnectionClientStateRequest: { - encode(message: QueryConnectionClientStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionClientStateRequest; - fromJSON(object: any): QueryConnectionClientStateRequest; - toJSON(message: QueryConnectionClientStateRequest): unknown; - fromPartial(object: DeepPartial): QueryConnectionClientStateRequest; -}; -export declare const QueryConnectionClientStateResponse: { - encode(message: QueryConnectionClientStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionClientStateResponse; - fromJSON(object: any): QueryConnectionClientStateResponse; - toJSON(message: QueryConnectionClientStateResponse): unknown; - fromPartial(object: DeepPartial): QueryConnectionClientStateResponse; -}; -export declare const QueryConnectionConsensusStateRequest: { - encode(message: QueryConnectionConsensusStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionConsensusStateRequest; - fromJSON(object: any): QueryConnectionConsensusStateRequest; - toJSON(message: QueryConnectionConsensusStateRequest): unknown; - fromPartial(object: DeepPartial): QueryConnectionConsensusStateRequest; -}; -export declare const QueryConnectionConsensusStateResponse: { - encode(message: QueryConnectionConsensusStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryConnectionConsensusStateResponse; - fromJSON(object: any): QueryConnectionConsensusStateResponse; - toJSON(message: QueryConnectionConsensusStateResponse): unknown; - fromPartial(object: DeepPartial): QueryConnectionConsensusStateResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Connection queries an IBC connection end. */ - Connection(request: QueryConnectionRequest): Promise; - /** Connections queries all the IBC connections of a chain. */ - Connections(request: QueryConnectionsRequest): Promise; - /** - * ClientConnections queries the connection paths associated with a client - * state. - */ - ClientConnections(request: QueryClientConnectionsRequest): Promise; - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ - ConnectionClientState(request: QueryConnectionClientStateRequest): Promise; - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - ConnectionConsensusState(request: QueryConnectionConsensusStateRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Connection(request: QueryConnectionRequest): Promise; - Connections(request: QueryConnectionsRequest): Promise; - ClientConnections(request: QueryClientConnectionsRequest): Promise; - ConnectionClientState(request: QueryConnectionClientStateRequest): Promise; - ConnectionConsensusState(request: QueryConnectionConsensusStateRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.js deleted file mode 100644 index 0c9537c..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.js +++ /dev/null @@ -1,934 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { ConnectionEnd, IdentifiedConnection, } from "../../../../ibc/core/connection/v1/connection"; -import { Height, IdentifiedClientState, } from "../../../../ibc/core/client/v1/client"; -import { PageRequest, PageResponse, } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -export const protobufPackage = "ibc.core.connection.v1"; -const baseQueryConnectionRequest = { connectionId: "" }; -export const QueryConnectionRequest = { - encode(message, writer = Writer.create()) { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryConnectionRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryConnectionRequest }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } - else { - message.connectionId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryConnectionRequest }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } - else { - message.connectionId = ""; - } - return message; - }, -}; -const baseQueryConnectionResponse = {}; -export const QueryConnectionResponse = { - encode(message, writer = Writer.create()) { - if (message.connection !== undefined) { - ConnectionEnd.encode(message.connection, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = ConnectionEnd.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionResponse, - }; - if (object.connection !== undefined && object.connection !== null) { - message.connection = ConnectionEnd.fromJSON(object.connection); - } - else { - message.connection = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connection !== undefined && - (obj.connection = message.connection - ? ConnectionEnd.toJSON(message.connection) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionResponse, - }; - if (object.connection !== undefined && object.connection !== null) { - message.connection = ConnectionEnd.fromPartial(object.connection); - } - else { - message.connection = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryConnectionsRequest = {}; -export const QueryConnectionsRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionsRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionsRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryConnectionsResponse = {}; -export const QueryConnectionsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.connections) { - IdentifiedConnection.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionsResponse, - }; - message.connections = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push(IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionsResponse, - }; - message.connections = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.connections) { - obj.connections = message.connections.map((e) => e ? IdentifiedConnection.toJSON(e) : undefined); - } - else { - obj.connections = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionsResponse, - }; - message.connections = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - return message; - }, -}; -const baseQueryClientConnectionsRequest = { clientId: "" }; -export const QueryClientConnectionsRequest = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientConnectionsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientConnectionsRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientConnectionsRequest, - }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - return message; - }, -}; -const baseQueryClientConnectionsResponse = { connectionPaths: "" }; -export const QueryClientConnectionsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.connectionPaths) { - writer.uint32(10).string(v); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientConnectionsResponse, - }; - message.connectionPaths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionPaths.push(reader.string()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryClientConnectionsResponse, - }; - message.connectionPaths = []; - if (object.connectionPaths !== undefined && - object.connectionPaths !== null) { - for (const e of object.connectionPaths) { - message.connectionPaths.push(String(e)); - } - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.connectionPaths) { - obj.connectionPaths = message.connectionPaths.map((e) => e); - } - else { - obj.connectionPaths = []; - } - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryClientConnectionsResponse, - }; - message.connectionPaths = []; - if (object.connectionPaths !== undefined && - object.connectionPaths !== null) { - for (const e of object.connectionPaths) { - message.connectionPaths.push(e); - } - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryConnectionClientStateRequest = { connectionId: "" }; -export const QueryConnectionClientStateRequest = { - encode(message, writer = Writer.create()) { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionClientStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionClientStateRequest, - }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } - else { - message.connectionId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionClientStateRequest, - }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } - else { - message.connectionId = ""; - } - return message; - }, -}; -const baseQueryConnectionClientStateResponse = {}; -export const QueryConnectionClientStateResponse = { - encode(message, writer = Writer.create()) { - if (message.identifiedClientState !== undefined) { - IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionClientStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifiedClientState = IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionClientStateResponse, - }; - if (object.identifiedClientState !== undefined && - object.identifiedClientState !== null) { - message.identifiedClientState = IdentifiedClientState.fromJSON(object.identifiedClientState); - } - else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.identifiedClientState !== undefined && - (obj.identifiedClientState = message.identifiedClientState - ? IdentifiedClientState.toJSON(message.identifiedClientState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionClientStateResponse, - }; - if (object.identifiedClientState !== undefined && - object.identifiedClientState !== null) { - message.identifiedClientState = IdentifiedClientState.fromPartial(object.identifiedClientState); - } - else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -const baseQueryConnectionConsensusStateRequest = { - connectionId: "", - revisionNumber: 0, - revisionHeight: 0, -}; -export const QueryConnectionConsensusStateRequest = { - encode(message, writer = Writer.create()) { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.revisionNumber !== 0) { - writer.uint32(16).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(24).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionConsensusStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 3: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionConsensusStateRequest, - }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } - else { - message.connectionId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionConsensusStateRequest, - }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } - else { - message.connectionId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseQueryConnectionConsensusStateResponse = { clientId: "" }; -export const QueryConnectionConsensusStateResponse = { - encode(message, writer = Writer.create()) { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionConsensusStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryConnectionConsensusStateResponse, - }; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.proof !== undefined && - (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryConnectionConsensusStateResponse, - }; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } - else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Connection(request) { - const data = QueryConnectionRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "Connection", data); - return promise.then((data) => QueryConnectionResponse.decode(new Reader(data))); - } - Connections(request) { - const data = QueryConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "Connections", data); - return promise.then((data) => QueryConnectionsResponse.decode(new Reader(data))); - } - ClientConnections(request) { - const data = QueryClientConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "ClientConnections", data); - return promise.then((data) => QueryClientConnectionsResponse.decode(new Reader(data))); - } - ConnectionClientState(request) { - const data = QueryConnectionClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "ConnectionClientState", data); - return promise.then((data) => QueryConnectionClientStateResponse.decode(new Reader(data))); - } - ConnectionConsensusState(request) { - const data = QueryConnectionConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "ConnectionConsensusState", data); - return promise.then((data) => QueryConnectionConsensusStateResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts deleted file mode 100644 index 6c2b331..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts +++ /dev/null @@ -1,1286 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - ConnectionEnd, - IdentifiedConnection, -} from "../../../../ibc/core/connection/v1/connection"; -import { - Height, - IdentifiedClientState, -} from "../../../../ibc/core/client/v1/client"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** - * QueryConnectionRequest is the request type for the Query/Connection RPC - * method - */ -export interface QueryConnectionRequest { - /** connection unique identifier */ - connectionId: string; -} - -/** - * QueryConnectionResponse is the response type for the Query/Connection RPC - * method. Besides the connection end, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryConnectionResponse { - /** connection associated with the request identifier */ - connection: ConnectionEnd | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryConnectionsRequest is the request type for the Query/Connections RPC - * method - */ -export interface QueryConnectionsRequest { - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionsResponse is the response type for the Query/Connections RPC - * method. - */ -export interface QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections: IdentifiedConnection[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryClientConnectionsRequest is the request type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsRequest { - /** client identifier associated with a connection */ - clientId: string; -} - -/** - * QueryClientConnectionsResponse is the response type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connectionPaths: string[]; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was generated */ - proofHeight: Height | undefined; -} - -/** - * QueryConnectionClientStateRequest is the request type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateRequest { - /** connection identifier */ - connectionId: string; -} - -/** - * QueryConnectionClientStateResponse is the response type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateResponse { - /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -/** - * QueryConnectionConsensusStateRequest is the request type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateRequest { - /** connection identifier */ - connectionId: string; - revisionNumber: number; - revisionHeight: number; -} - -/** - * QueryConnectionConsensusStateResponse is the response type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateResponse { - /** consensus state associated with the channel */ - consensusState: Any | undefined; - /** client ID associated with the consensus state */ - clientId: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} - -const baseQueryConnectionRequest: object = { connectionId: "" }; - -export const QueryConnectionRequest = { - encode( - message: QueryConnectionRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryConnectionRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionRequest { - const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } else { - message.connectionId = ""; - } - return message; - }, - - toJSON(message: QueryConnectionRequest): unknown { - const obj: any = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionRequest { - const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } else { - message.connectionId = ""; - } - return message; - }, -}; - -const baseQueryConnectionResponse: object = {}; - -export const QueryConnectionResponse = { - encode( - message: QueryConnectionResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.connection !== undefined) { - ConnectionEnd.encode( - message.connection, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryConnectionResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionResponse, - } as QueryConnectionResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = ConnectionEnd.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionResponse { - const message = { - ...baseQueryConnectionResponse, - } as QueryConnectionResponse; - if (object.connection !== undefined && object.connection !== null) { - message.connection = ConnectionEnd.fromJSON(object.connection); - } else { - message.connection = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionResponse): unknown { - const obj: any = {}; - message.connection !== undefined && - (obj.connection = message.connection - ? ConnectionEnd.toJSON(message.connection) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionResponse { - const message = { - ...baseQueryConnectionResponse, - } as QueryConnectionResponse; - if (object.connection !== undefined && object.connection !== null) { - message.connection = ConnectionEnd.fromPartial(object.connection); - } else { - message.connection = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryConnectionsRequest: object = {}; - -export const QueryConnectionsRequest = { - encode( - message: QueryConnectionsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryConnectionsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionsRequest, - } as QueryConnectionsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionsRequest { - const message = { - ...baseQueryConnectionsRequest, - } as QueryConnectionsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionsRequest { - const message = { - ...baseQueryConnectionsRequest, - } as QueryConnectionsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConnectionsResponse: object = {}; - -export const QueryConnectionsResponse = { - encode( - message: QueryConnectionsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.connections) { - IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionsResponse, - } as QueryConnectionsResponse; - message.connections = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push( - IdentifiedConnection.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionsResponse { - const message = { - ...baseQueryConnectionsResponse, - } as QueryConnectionsResponse; - message.connections = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionsResponse): unknown { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map((e) => - e ? IdentifiedConnection.toJSON(e) : undefined - ); - } else { - obj.connections = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionsResponse { - const message = { - ...baseQueryConnectionsResponse, - } as QueryConnectionsResponse; - message.connections = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryClientConnectionsRequest: object = { clientId: "" }; - -export const QueryClientConnectionsRequest = { - encode( - message: QueryClientConnectionsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientConnectionsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientConnectionsRequest, - } as QueryClientConnectionsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientConnectionsRequest { - const message = { - ...baseQueryClientConnectionsRequest, - } as QueryClientConnectionsRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - return message; - }, - - toJSON(message: QueryClientConnectionsRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientConnectionsRequest { - const message = { - ...baseQueryClientConnectionsRequest, - } as QueryClientConnectionsRequest; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - return message; - }, -}; - -const baseQueryClientConnectionsResponse: object = { connectionPaths: "" }; - -export const QueryClientConnectionsResponse = { - encode( - message: QueryClientConnectionsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.connectionPaths) { - writer.uint32(10).string(v!); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientConnectionsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientConnectionsResponse, - } as QueryClientConnectionsResponse; - message.connectionPaths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionPaths.push(reader.string()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientConnectionsResponse { - const message = { - ...baseQueryClientConnectionsResponse, - } as QueryClientConnectionsResponse; - message.connectionPaths = []; - if ( - object.connectionPaths !== undefined && - object.connectionPaths !== null - ) { - for (const e of object.connectionPaths) { - message.connectionPaths.push(String(e)); - } - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryClientConnectionsResponse): unknown { - const obj: any = {}; - if (message.connectionPaths) { - obj.connectionPaths = message.connectionPaths.map((e) => e); - } else { - obj.connectionPaths = []; - } - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientConnectionsResponse { - const message = { - ...baseQueryClientConnectionsResponse, - } as QueryClientConnectionsResponse; - message.connectionPaths = []; - if ( - object.connectionPaths !== undefined && - object.connectionPaths !== null - ) { - for (const e of object.connectionPaths) { - message.connectionPaths.push(e); - } - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryConnectionClientStateRequest: object = { connectionId: "" }; - -export const QueryConnectionClientStateRequest = { - encode( - message: QueryConnectionClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionClientStateRequest, - } as QueryConnectionClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionClientStateRequest { - const message = { - ...baseQueryConnectionClientStateRequest, - } as QueryConnectionClientStateRequest; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } else { - message.connectionId = ""; - } - return message; - }, - - toJSON(message: QueryConnectionClientStateRequest): unknown { - const obj: any = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionClientStateRequest { - const message = { - ...baseQueryConnectionClientStateRequest, - } as QueryConnectionClientStateRequest; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } else { - message.connectionId = ""; - } - return message; - }, -}; - -const baseQueryConnectionClientStateResponse: object = {}; - -export const QueryConnectionClientStateResponse = { - encode( - message: QueryConnectionClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.identifiedClientState !== undefined) { - IdentifiedClientState.encode( - message.identifiedClientState, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionClientStateResponse, - } as QueryConnectionClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifiedClientState = IdentifiedClientState.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionClientStateResponse { - const message = { - ...baseQueryConnectionClientStateResponse, - } as QueryConnectionClientStateResponse; - if ( - object.identifiedClientState !== undefined && - object.identifiedClientState !== null - ) { - message.identifiedClientState = IdentifiedClientState.fromJSON( - object.identifiedClientState - ); - } else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionClientStateResponse): unknown { - const obj: any = {}; - message.identifiedClientState !== undefined && - (obj.identifiedClientState = message.identifiedClientState - ? IdentifiedClientState.toJSON(message.identifiedClientState) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionClientStateResponse { - const message = { - ...baseQueryConnectionClientStateResponse, - } as QueryConnectionClientStateResponse; - if ( - object.identifiedClientState !== undefined && - object.identifiedClientState !== null - ) { - message.identifiedClientState = IdentifiedClientState.fromPartial( - object.identifiedClientState - ); - } else { - message.identifiedClientState = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -const baseQueryConnectionConsensusStateRequest: object = { - connectionId: "", - revisionNumber: 0, - revisionHeight: 0, -}; - -export const QueryConnectionConsensusStateRequest = { - encode( - message: QueryConnectionConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.revisionNumber !== 0) { - writer.uint32(16).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(24).uint64(message.revisionHeight); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionConsensusStateRequest, - } as QueryConnectionConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 3: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionConsensusStateRequest { - const message = { - ...baseQueryConnectionConsensusStateRequest, - } as QueryConnectionConsensusStateRequest; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } else { - message.connectionId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: QueryConnectionConsensusStateRequest): unknown { - const obj: any = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionConsensusStateRequest { - const message = { - ...baseQueryConnectionConsensusStateRequest, - } as QueryConnectionConsensusStateRequest; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } else { - message.connectionId = ""; - } - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseQueryConnectionConsensusStateResponse: object = { clientId: "" }; - -export const QueryConnectionConsensusStateResponse = { - encode( - message: QueryConnectionConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionConsensusStateResponse, - } as QueryConnectionConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionConsensusStateResponse { - const message = { - ...baseQueryConnectionConsensusStateResponse, - } as QueryConnectionConsensusStateResponse; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionConsensusStateResponse): unknown { - const obj: any = {}; - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionConsensusStateResponse { - const message = { - ...baseQueryConnectionConsensusStateResponse, - } as QueryConnectionConsensusStateResponse; - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Connection queries an IBC connection end. */ - Connection(request: QueryConnectionRequest): Promise; - /** Connections queries all the IBC connections of a chain. */ - Connections( - request: QueryConnectionsRequest - ): Promise; - /** - * ClientConnections queries the connection paths associated with a client - * state. - */ - ClientConnections( - request: QueryClientConnectionsRequest - ): Promise; - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ - ConnectionClientState( - request: QueryConnectionClientStateRequest - ): Promise; - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - ConnectionConsensusState( - request: QueryConnectionConsensusStateRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Connection( - request: QueryConnectionRequest - ): Promise { - const data = QueryConnectionRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "Connection", - data - ); - return promise.then((data) => - QueryConnectionResponse.decode(new Reader(data)) - ); - } - - Connections( - request: QueryConnectionsRequest - ): Promise { - const data = QueryConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "Connections", - data - ); - return promise.then((data) => - QueryConnectionsResponse.decode(new Reader(data)) - ); - } - - ClientConnections( - request: QueryClientConnectionsRequest - ): Promise { - const data = QueryClientConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "ClientConnections", - data - ); - return promise.then((data) => - QueryClientConnectionsResponse.decode(new Reader(data)) - ); - } - - ConnectionClientState( - request: QueryConnectionClientStateRequest - ): Promise { - const data = QueryConnectionClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "ConnectionClientState", - data - ); - return promise.then((data) => - QueryConnectionClientStateResponse.decode(new Reader(data)) - ); - } - - ConnectionConsensusState( - request: QueryConnectionConsensusStateRequest - ): Promise { - const data = QueryConnectionConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "ConnectionConsensusState", - data - ); - return promise.then((data) => - QueryConnectionConsensusStateResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.d.ts deleted file mode 100644 index f695fde..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Counterparty, Version } from "../../../../ibc/core/connection/v1/connection"; -import { Any } from "../../../../google/protobuf/any"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export declare const protobufPackage = "ibc.core.connection.v1"; -/** - * MsgConnectionOpenInit defines the msg sent by an account on Chain A to - * initialize a connection with Chain B. - */ -export interface MsgConnectionOpenInit { - clientId: string; - counterparty: Counterparty | undefined; - version: Version | undefined; - delayPeriod: number; - signer: string; -} -/** MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. */ -export interface MsgConnectionOpenInitResponse { -} -/** - * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a - * connection on Chain B. - */ -export interface MsgConnectionOpenTry { - clientId: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need the connection identifier - * of the previous connection in state INIT - */ - previousConnectionId: string; - clientState: Any | undefined; - counterparty: Counterparty | undefined; - delayPeriod: number; - counterpartyVersions: Version[]; - proofHeight: Height | undefined; - /** - * proof of the initialization the connection on Chain A: `UNITIALIZED -> - * INIT` - */ - proofInit: Uint8Array; - /** proof of client state included in message */ - proofClient: Uint8Array; - /** proof of client consensus state */ - proofConsensus: Uint8Array; - consensusHeight: Height | undefined; - signer: string; -} -/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponse { -} -/** - * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to - * acknowledge the change of connection state to TRYOPEN on Chain B. - */ -export interface MsgConnectionOpenAck { - connectionId: string; - counterpartyConnectionId: string; - version: Version | undefined; - clientState: Any | undefined; - proofHeight: Height | undefined; - /** - * proof of the initialization the connection on Chain B: `UNITIALIZED -> - * TRYOPEN` - */ - proofTry: Uint8Array; - /** proof of client state included in message */ - proofClient: Uint8Array; - /** proof of client consensus state */ - proofConsensus: Uint8Array; - consensusHeight: Height | undefined; - signer: string; -} -/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponse { -} -/** - * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of connection state to OPEN on Chain A. - */ -export interface MsgConnectionOpenConfirm { - connectionId: string; - /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */ - proofAck: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -/** MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. */ -export interface MsgConnectionOpenConfirmResponse { -} -export declare const MsgConnectionOpenInit: { - encode(message: MsgConnectionOpenInit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenInit; - fromJSON(object: any): MsgConnectionOpenInit; - toJSON(message: MsgConnectionOpenInit): unknown; - fromPartial(object: DeepPartial): MsgConnectionOpenInit; -}; -export declare const MsgConnectionOpenInitResponse: { - encode(_: MsgConnectionOpenInitResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenInitResponse; - fromJSON(_: any): MsgConnectionOpenInitResponse; - toJSON(_: MsgConnectionOpenInitResponse): unknown; - fromPartial(_: DeepPartial): MsgConnectionOpenInitResponse; -}; -export declare const MsgConnectionOpenTry: { - encode(message: MsgConnectionOpenTry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenTry; - fromJSON(object: any): MsgConnectionOpenTry; - toJSON(message: MsgConnectionOpenTry): unknown; - fromPartial(object: DeepPartial): MsgConnectionOpenTry; -}; -export declare const MsgConnectionOpenTryResponse: { - encode(_: MsgConnectionOpenTryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenTryResponse; - fromJSON(_: any): MsgConnectionOpenTryResponse; - toJSON(_: MsgConnectionOpenTryResponse): unknown; - fromPartial(_: DeepPartial): MsgConnectionOpenTryResponse; -}; -export declare const MsgConnectionOpenAck: { - encode(message: MsgConnectionOpenAck, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenAck; - fromJSON(object: any): MsgConnectionOpenAck; - toJSON(message: MsgConnectionOpenAck): unknown; - fromPartial(object: DeepPartial): MsgConnectionOpenAck; -}; -export declare const MsgConnectionOpenAckResponse: { - encode(_: MsgConnectionOpenAckResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenAckResponse; - fromJSON(_: any): MsgConnectionOpenAckResponse; - toJSON(_: MsgConnectionOpenAckResponse): unknown; - fromPartial(_: DeepPartial): MsgConnectionOpenAckResponse; -}; -export declare const MsgConnectionOpenConfirm: { - encode(message: MsgConnectionOpenConfirm, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenConfirm; - fromJSON(object: any): MsgConnectionOpenConfirm; - toJSON(message: MsgConnectionOpenConfirm): unknown; - fromPartial(object: DeepPartial): MsgConnectionOpenConfirm; -}; -export declare const MsgConnectionOpenConfirmResponse: { - encode(_: MsgConnectionOpenConfirmResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenConfirmResponse; - fromJSON(_: any): MsgConnectionOpenConfirmResponse; - toJSON(_: MsgConnectionOpenConfirmResponse): unknown; - fromPartial(_: DeepPartial): MsgConnectionOpenConfirmResponse; -}; -/** Msg defines the ibc/connection Msg service. */ -export interface Msg { - /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ - ConnectionOpenInit(request: MsgConnectionOpenInit): Promise; - /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ - ConnectionOpenTry(request: MsgConnectionOpenTry): Promise; - /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ - ConnectionOpenAck(request: MsgConnectionOpenAck): Promise; - /** ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. */ - ConnectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - ConnectionOpenInit(request: MsgConnectionOpenInit): Promise; - ConnectionOpenTry(request: MsgConnectionOpenTry): Promise; - ConnectionOpenAck(request: MsgConnectionOpenAck): Promise; - ConnectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.js deleted file mode 100644 index 1216ac3..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.js +++ /dev/null @@ -1,1009 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Counterparty, Version, } from "../../../../ibc/core/connection/v1/connection"; -import { Any } from "../../../../google/protobuf/any"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export const protobufPackage = "ibc.core.connection.v1"; -const baseMsgConnectionOpenInit = { - clientId: "", - delayPeriod: 0, - signer: "", -}; -export const MsgConnectionOpenInit = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(18).fork()).ldelim(); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(32).uint64(message.delayPeriod); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenInit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.delayPeriod = longToNumber(reader.uint64()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgConnectionOpenInit }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromJSON(object.version); - } - else { - message.version = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } - else { - message.delayPeriod = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? Version.toJSON(message.version) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgConnectionOpenInit }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromPartial(object.version); - } - else { - message.version = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } - else { - message.delayPeriod = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgConnectionOpenInitResponse = {}; -export const MsgConnectionOpenInitResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenInitResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgConnectionOpenInitResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgConnectionOpenInitResponse, - }; - return message; - }, -}; -const baseMsgConnectionOpenTry = { - clientId: "", - previousConnectionId: "", - delayPeriod: 0, - signer: "", -}; -export const MsgConnectionOpenTry = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.previousConnectionId !== "") { - writer.uint32(18).string(message.previousConnectionId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(26).fork()).ldelim(); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(34).fork()).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(40).uint64(message.delayPeriod); - } - for (const v of message.counterpartyVersions) { - Version.encode(v, writer.uint32(50).fork()).ldelim(); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(58).fork()).ldelim(); - } - if (message.proofInit.length !== 0) { - writer.uint32(66).bytes(message.proofInit); - } - if (message.proofClient.length !== 0) { - writer.uint32(74).bytes(message.proofClient); - } - if (message.proofConsensus.length !== 0) { - writer.uint32(82).bytes(message.proofConsensus); - } - if (message.consensusHeight !== undefined) { - Height.encode(message.consensusHeight, writer.uint32(90).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(98).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenTry }; - message.counterpartyVersions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.previousConnectionId = reader.string(); - break; - case 3: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = longToNumber(reader.uint64()); - break; - case 6: - message.counterpartyVersions.push(Version.decode(reader, reader.uint32())); - break; - case 7: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.proofInit = reader.bytes(); - break; - case 9: - message.proofClient = reader.bytes(); - break; - case 10: - message.proofConsensus = reader.bytes(); - break; - case 11: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgConnectionOpenTry }; - message.counterpartyVersions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.previousConnectionId !== undefined && - object.previousConnectionId !== null) { - message.previousConnectionId = String(object.previousConnectionId); - } - else { - message.previousConnectionId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } - else { - message.delayPeriod = 0; - } - if (object.counterpartyVersions !== undefined && - object.counterpartyVersions !== null) { - for (const e of object.counterpartyVersions) { - message.counterpartyVersions.push(Version.fromJSON(e)); - } - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = bytesFromBase64(object.proofInit); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = bytesFromBase64(object.proofClient); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = bytesFromBase64(object.proofConsensus); - } - if (object.consensusHeight !== undefined && - object.consensusHeight !== null) { - message.consensusHeight = Height.fromJSON(object.consensusHeight); - } - else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.previousConnectionId !== undefined && - (obj.previousConnectionId = message.previousConnectionId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - if (message.counterpartyVersions) { - obj.counterpartyVersions = message.counterpartyVersions.map((e) => e ? Version.toJSON(e) : undefined); - } - else { - obj.counterpartyVersions = []; - } - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.proofInit !== undefined && - (obj.proofInit = base64FromBytes(message.proofInit !== undefined ? message.proofInit : new Uint8Array())); - message.proofClient !== undefined && - (obj.proofClient = base64FromBytes(message.proofClient !== undefined - ? message.proofClient - : new Uint8Array())); - message.proofConsensus !== undefined && - (obj.proofConsensus = base64FromBytes(message.proofConsensus !== undefined - ? message.proofConsensus - : new Uint8Array())); - message.consensusHeight !== undefined && - (obj.consensusHeight = message.consensusHeight - ? Height.toJSON(message.consensusHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgConnectionOpenTry }; - message.counterpartyVersions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.previousConnectionId !== undefined && - object.previousConnectionId !== null) { - message.previousConnectionId = object.previousConnectionId; - } - else { - message.previousConnectionId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } - else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } - else { - message.delayPeriod = 0; - } - if (object.counterpartyVersions !== undefined && - object.counterpartyVersions !== null) { - for (const e of object.counterpartyVersions) { - message.counterpartyVersions.push(Version.fromPartial(e)); - } - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = object.proofInit; - } - else { - message.proofInit = new Uint8Array(); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = object.proofClient; - } - else { - message.proofClient = new Uint8Array(); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = object.proofConsensus; - } - else { - message.proofConsensus = new Uint8Array(); - } - if (object.consensusHeight !== undefined && - object.consensusHeight !== null) { - message.consensusHeight = Height.fromPartial(object.consensusHeight); - } - else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgConnectionOpenTryResponse = {}; -export const MsgConnectionOpenTryResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenTryResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgConnectionOpenTryResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgConnectionOpenTryResponse, - }; - return message; - }, -}; -const baseMsgConnectionOpenAck = { - connectionId: "", - counterpartyConnectionId: "", - signer: "", -}; -export const MsgConnectionOpenAck = { - encode(message, writer = Writer.create()) { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.counterpartyConnectionId !== "") { - writer.uint32(18).string(message.counterpartyConnectionId); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(34).fork()).ldelim(); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(42).fork()).ldelim(); - } - if (message.proofTry.length !== 0) { - writer.uint32(50).bytes(message.proofTry); - } - if (message.proofClient.length !== 0) { - writer.uint32(58).bytes(message.proofClient); - } - if (message.proofConsensus.length !== 0) { - writer.uint32(66).bytes(message.proofConsensus); - } - if (message.consensusHeight !== undefined) { - Height.encode(message.consensusHeight, writer.uint32(74).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(82).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenAck }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.counterpartyConnectionId = reader.string(); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 5: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 6: - message.proofTry = reader.bytes(); - break; - case 7: - message.proofClient = reader.bytes(); - break; - case 8: - message.proofConsensus = reader.bytes(); - break; - case 9: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgConnectionOpenAck }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } - else { - message.connectionId = ""; - } - if (object.counterpartyConnectionId !== undefined && - object.counterpartyConnectionId !== null) { - message.counterpartyConnectionId = String(object.counterpartyConnectionId); - } - else { - message.counterpartyConnectionId = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromJSON(object.version); - } - else { - message.version = undefined; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = bytesFromBase64(object.proofTry); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = bytesFromBase64(object.proofClient); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = bytesFromBase64(object.proofConsensus); - } - if (object.consensusHeight !== undefined && - object.consensusHeight !== null) { - message.consensusHeight = Height.fromJSON(object.consensusHeight); - } - else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.counterpartyConnectionId !== undefined && - (obj.counterpartyConnectionId = message.counterpartyConnectionId); - message.version !== undefined && - (obj.version = message.version - ? Version.toJSON(message.version) - : undefined); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.proofTry !== undefined && - (obj.proofTry = base64FromBytes(message.proofTry !== undefined ? message.proofTry : new Uint8Array())); - message.proofClient !== undefined && - (obj.proofClient = base64FromBytes(message.proofClient !== undefined - ? message.proofClient - : new Uint8Array())); - message.proofConsensus !== undefined && - (obj.proofConsensus = base64FromBytes(message.proofConsensus !== undefined - ? message.proofConsensus - : new Uint8Array())); - message.consensusHeight !== undefined && - (obj.consensusHeight = message.consensusHeight - ? Height.toJSON(message.consensusHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgConnectionOpenAck }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } - else { - message.connectionId = ""; - } - if (object.counterpartyConnectionId !== undefined && - object.counterpartyConnectionId !== null) { - message.counterpartyConnectionId = object.counterpartyConnectionId; - } - else { - message.counterpartyConnectionId = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromPartial(object.version); - } - else { - message.version = undefined; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = object.proofTry; - } - else { - message.proofTry = new Uint8Array(); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = object.proofClient; - } - else { - message.proofClient = new Uint8Array(); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = object.proofConsensus; - } - else { - message.proofConsensus = new Uint8Array(); - } - if (object.consensusHeight !== undefined && - object.consensusHeight !== null) { - message.consensusHeight = Height.fromPartial(object.consensusHeight); - } - else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgConnectionOpenAckResponse = {}; -export const MsgConnectionOpenAckResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenAckResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgConnectionOpenAckResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgConnectionOpenAckResponse, - }; - return message; - }, -}; -const baseMsgConnectionOpenConfirm = { connectionId: "", signer: "" }; -export const MsgConnectionOpenConfirm = { - encode(message, writer = Writer.create()) { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.proofAck.length !== 0) { - writer.uint32(18).bytes(message.proofAck); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenConfirm, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.proofAck = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgConnectionOpenConfirm, - }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } - else { - message.connectionId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = bytesFromBase64(object.proofAck); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } - else { - message.signer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.proofAck !== undefined && - (obj.proofAck = base64FromBytes(message.proofAck !== undefined ? message.proofAck : new Uint8Array())); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgConnectionOpenConfirm, - }; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } - else { - message.connectionId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = object.proofAck; - } - else { - message.proofAck = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } - else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } - else { - message.signer = ""; - } - return message; - }, -}; -const baseMsgConnectionOpenConfirmResponse = {}; -export const MsgConnectionOpenConfirmResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenConfirmResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgConnectionOpenConfirmResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgConnectionOpenConfirmResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - ConnectionOpenInit(request) { - const data = MsgConnectionOpenInit.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenInit", data); - return promise.then((data) => MsgConnectionOpenInitResponse.decode(new Reader(data))); - } - ConnectionOpenTry(request) { - const data = MsgConnectionOpenTry.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenTry", data); - return promise.then((data) => MsgConnectionOpenTryResponse.decode(new Reader(data))); - } - ConnectionOpenAck(request) { - const data = MsgConnectionOpenAck.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenAck", data); - return promise.then((data) => MsgConnectionOpenAckResponse.decode(new Reader(data))); - } - ConnectionOpenConfirm(request) { - const data = MsgConnectionOpenConfirm.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenConfirm", data); - return promise.then((data) => MsgConnectionOpenConfirmResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts deleted file mode 100644 index da43da1..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts +++ /dev/null @@ -1,1273 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - Counterparty, - Version, -} from "../../../../ibc/core/connection/v1/connection"; -import { Any } from "../../../../google/protobuf/any"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** - * MsgConnectionOpenInit defines the msg sent by an account on Chain A to - * initialize a connection with Chain B. - */ -export interface MsgConnectionOpenInit { - clientId: string; - counterparty: Counterparty | undefined; - version: Version | undefined; - delayPeriod: number; - signer: string; -} - -/** MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. */ -export interface MsgConnectionOpenInitResponse {} - -/** - * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a - * connection on Chain B. - */ -export interface MsgConnectionOpenTry { - clientId: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need the connection identifier - * of the previous connection in state INIT - */ - previousConnectionId: string; - clientState: Any | undefined; - counterparty: Counterparty | undefined; - delayPeriod: number; - counterpartyVersions: Version[]; - proofHeight: Height | undefined; - /** - * proof of the initialization the connection on Chain A: `UNITIALIZED -> - * INIT` - */ - proofInit: Uint8Array; - /** proof of client state included in message */ - proofClient: Uint8Array; - /** proof of client consensus state */ - proofConsensus: Uint8Array; - consensusHeight: Height | undefined; - signer: string; -} - -/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponse {} - -/** - * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to - * acknowledge the change of connection state to TRYOPEN on Chain B. - */ -export interface MsgConnectionOpenAck { - connectionId: string; - counterpartyConnectionId: string; - version: Version | undefined; - clientState: Any | undefined; - proofHeight: Height | undefined; - /** - * proof of the initialization the connection on Chain B: `UNITIALIZED -> - * TRYOPEN` - */ - proofTry: Uint8Array; - /** proof of client state included in message */ - proofClient: Uint8Array; - /** proof of client consensus state */ - proofConsensus: Uint8Array; - consensusHeight: Height | undefined; - signer: string; -} - -/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponse {} - -/** - * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of connection state to OPEN on Chain A. - */ -export interface MsgConnectionOpenConfirm { - connectionId: string; - /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */ - proofAck: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} - -/** MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. */ -export interface MsgConnectionOpenConfirmResponse {} - -const baseMsgConnectionOpenInit: object = { - clientId: "", - delayPeriod: 0, - signer: "", -}; - -export const MsgConnectionOpenInit = { - encode( - message: MsgConnectionOpenInit, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(32).uint64(message.delayPeriod); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenInit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenInit } as MsgConnectionOpenInit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.delayPeriod = longToNumber(reader.uint64() as Long); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenInit { - const message = { ...baseMsgConnectionOpenInit } as MsgConnectionOpenInit; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } else { - message.delayPeriod = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenInit): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? Version.toJSON(message.version) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgConnectionOpenInit { - const message = { ...baseMsgConnectionOpenInit } as MsgConnectionOpenInit; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } else { - message.delayPeriod = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenInitResponse: object = {}; - -export const MsgConnectionOpenInitResponse = { - encode( - _: MsgConnectionOpenInitResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenInitResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenInitResponse, - } as MsgConnectionOpenInitResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenInitResponse { - const message = { - ...baseMsgConnectionOpenInitResponse, - } as MsgConnectionOpenInitResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenInitResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenInitResponse { - const message = { - ...baseMsgConnectionOpenInitResponse, - } as MsgConnectionOpenInitResponse; - return message; - }, -}; - -const baseMsgConnectionOpenTry: object = { - clientId: "", - previousConnectionId: "", - delayPeriod: 0, - signer: "", -}; - -export const MsgConnectionOpenTry = { - encode( - message: MsgConnectionOpenTry, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.previousConnectionId !== "") { - writer.uint32(18).string(message.previousConnectionId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(26).fork()).ldelim(); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.delayPeriod !== 0) { - writer.uint32(40).uint64(message.delayPeriod); - } - for (const v of message.counterpartyVersions) { - Version.encode(v!, writer.uint32(50).fork()).ldelim(); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(58).fork()).ldelim(); - } - if (message.proofInit.length !== 0) { - writer.uint32(66).bytes(message.proofInit); - } - if (message.proofClient.length !== 0) { - writer.uint32(74).bytes(message.proofClient); - } - if (message.proofConsensus.length !== 0) { - writer.uint32(82).bytes(message.proofConsensus); - } - if (message.consensusHeight !== undefined) { - Height.encode(message.consensusHeight, writer.uint32(90).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(98).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenTry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenTry } as MsgConnectionOpenTry; - message.counterpartyVersions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.previousConnectionId = reader.string(); - break; - case 3: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = longToNumber(reader.uint64() as Long); - break; - case 6: - message.counterpartyVersions.push( - Version.decode(reader, reader.uint32()) - ); - break; - case 7: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.proofInit = reader.bytes(); - break; - case 9: - message.proofClient = reader.bytes(); - break; - case 10: - message.proofConsensus = reader.bytes(); - break; - case 11: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenTry { - const message = { ...baseMsgConnectionOpenTry } as MsgConnectionOpenTry; - message.counterpartyVersions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if ( - object.previousConnectionId !== undefined && - object.previousConnectionId !== null - ) { - message.previousConnectionId = String(object.previousConnectionId); - } else { - message.previousConnectionId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = Number(object.delayPeriod); - } else { - message.delayPeriod = 0; - } - if ( - object.counterpartyVersions !== undefined && - object.counterpartyVersions !== null - ) { - for (const e of object.counterpartyVersions) { - message.counterpartyVersions.push(Version.fromJSON(e)); - } - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = bytesFromBase64(object.proofInit); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = bytesFromBase64(object.proofClient); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = bytesFromBase64(object.proofConsensus); - } - if ( - object.consensusHeight !== undefined && - object.consensusHeight !== null - ) { - message.consensusHeight = Height.fromJSON(object.consensusHeight); - } else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenTry): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.previousConnectionId !== undefined && - (obj.previousConnectionId = message.previousConnectionId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delayPeriod !== undefined && - (obj.delayPeriod = message.delayPeriod); - if (message.counterpartyVersions) { - obj.counterpartyVersions = message.counterpartyVersions.map((e) => - e ? Version.toJSON(e) : undefined - ); - } else { - obj.counterpartyVersions = []; - } - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.proofInit !== undefined && - (obj.proofInit = base64FromBytes( - message.proofInit !== undefined ? message.proofInit : new Uint8Array() - )); - message.proofClient !== undefined && - (obj.proofClient = base64FromBytes( - message.proofClient !== undefined - ? message.proofClient - : new Uint8Array() - )); - message.proofConsensus !== undefined && - (obj.proofConsensus = base64FromBytes( - message.proofConsensus !== undefined - ? message.proofConsensus - : new Uint8Array() - )); - message.consensusHeight !== undefined && - (obj.consensusHeight = message.consensusHeight - ? Height.toJSON(message.consensusHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgConnectionOpenTry { - const message = { ...baseMsgConnectionOpenTry } as MsgConnectionOpenTry; - message.counterpartyVersions = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if ( - object.previousConnectionId !== undefined && - object.previousConnectionId !== null - ) { - message.previousConnectionId = object.previousConnectionId; - } else { - message.previousConnectionId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delayPeriod !== undefined && object.delayPeriod !== null) { - message.delayPeriod = object.delayPeriod; - } else { - message.delayPeriod = 0; - } - if ( - object.counterpartyVersions !== undefined && - object.counterpartyVersions !== null - ) { - for (const e of object.counterpartyVersions) { - message.counterpartyVersions.push(Version.fromPartial(e)); - } - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.proofInit !== undefined && object.proofInit !== null) { - message.proofInit = object.proofInit; - } else { - message.proofInit = new Uint8Array(); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = object.proofClient; - } else { - message.proofClient = new Uint8Array(); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = object.proofConsensus; - } else { - message.proofConsensus = new Uint8Array(); - } - if ( - object.consensusHeight !== undefined && - object.consensusHeight !== null - ) { - message.consensusHeight = Height.fromPartial(object.consensusHeight); - } else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenTryResponse: object = {}; - -export const MsgConnectionOpenTryResponse = { - encode( - _: MsgConnectionOpenTryResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenTryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenTryResponse, - } as MsgConnectionOpenTryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenTryResponse { - const message = { - ...baseMsgConnectionOpenTryResponse, - } as MsgConnectionOpenTryResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenTryResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenTryResponse { - const message = { - ...baseMsgConnectionOpenTryResponse, - } as MsgConnectionOpenTryResponse; - return message; - }, -}; - -const baseMsgConnectionOpenAck: object = { - connectionId: "", - counterpartyConnectionId: "", - signer: "", -}; - -export const MsgConnectionOpenAck = { - encode( - message: MsgConnectionOpenAck, - writer: Writer = Writer.create() - ): Writer { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.counterpartyConnectionId !== "") { - writer.uint32(18).string(message.counterpartyConnectionId); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(34).fork()).ldelim(); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(42).fork()).ldelim(); - } - if (message.proofTry.length !== 0) { - writer.uint32(50).bytes(message.proofTry); - } - if (message.proofClient.length !== 0) { - writer.uint32(58).bytes(message.proofClient); - } - if (message.proofConsensus.length !== 0) { - writer.uint32(66).bytes(message.proofConsensus); - } - if (message.consensusHeight !== undefined) { - Height.encode(message.consensusHeight, writer.uint32(74).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(82).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenAck { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenAck } as MsgConnectionOpenAck; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.counterpartyConnectionId = reader.string(); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 5: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 6: - message.proofTry = reader.bytes(); - break; - case 7: - message.proofClient = reader.bytes(); - break; - case 8: - message.proofConsensus = reader.bytes(); - break; - case 9: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenAck { - const message = { ...baseMsgConnectionOpenAck } as MsgConnectionOpenAck; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } else { - message.connectionId = ""; - } - if ( - object.counterpartyConnectionId !== undefined && - object.counterpartyConnectionId !== null - ) { - message.counterpartyConnectionId = String( - object.counterpartyConnectionId - ); - } else { - message.counterpartyConnectionId = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = bytesFromBase64(object.proofTry); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = bytesFromBase64(object.proofClient); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = bytesFromBase64(object.proofConsensus); - } - if ( - object.consensusHeight !== undefined && - object.consensusHeight !== null - ) { - message.consensusHeight = Height.fromJSON(object.consensusHeight); - } else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenAck): unknown { - const obj: any = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.counterpartyConnectionId !== undefined && - (obj.counterpartyConnectionId = message.counterpartyConnectionId); - message.version !== undefined && - (obj.version = message.version - ? Version.toJSON(message.version) - : undefined); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.proofTry !== undefined && - (obj.proofTry = base64FromBytes( - message.proofTry !== undefined ? message.proofTry : new Uint8Array() - )); - message.proofClient !== undefined && - (obj.proofClient = base64FromBytes( - message.proofClient !== undefined - ? message.proofClient - : new Uint8Array() - )); - message.proofConsensus !== undefined && - (obj.proofConsensus = base64FromBytes( - message.proofConsensus !== undefined - ? message.proofConsensus - : new Uint8Array() - )); - message.consensusHeight !== undefined && - (obj.consensusHeight = message.consensusHeight - ? Height.toJSON(message.consensusHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgConnectionOpenAck { - const message = { ...baseMsgConnectionOpenAck } as MsgConnectionOpenAck; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } else { - message.connectionId = ""; - } - if ( - object.counterpartyConnectionId !== undefined && - object.counterpartyConnectionId !== null - ) { - message.counterpartyConnectionId = object.counterpartyConnectionId; - } else { - message.counterpartyConnectionId = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.proofTry !== undefined && object.proofTry !== null) { - message.proofTry = object.proofTry; - } else { - message.proofTry = new Uint8Array(); - } - if (object.proofClient !== undefined && object.proofClient !== null) { - message.proofClient = object.proofClient; - } else { - message.proofClient = new Uint8Array(); - } - if (object.proofConsensus !== undefined && object.proofConsensus !== null) { - message.proofConsensus = object.proofConsensus; - } else { - message.proofConsensus = new Uint8Array(); - } - if ( - object.consensusHeight !== undefined && - object.consensusHeight !== null - ) { - message.consensusHeight = Height.fromPartial(object.consensusHeight); - } else { - message.consensusHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenAckResponse: object = {}; - -export const MsgConnectionOpenAckResponse = { - encode( - _: MsgConnectionOpenAckResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenAckResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenAckResponse, - } as MsgConnectionOpenAckResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenAckResponse { - const message = { - ...baseMsgConnectionOpenAckResponse, - } as MsgConnectionOpenAckResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenAckResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenAckResponse { - const message = { - ...baseMsgConnectionOpenAckResponse, - } as MsgConnectionOpenAckResponse; - return message; - }, -}; - -const baseMsgConnectionOpenConfirm: object = { connectionId: "", signer: "" }; - -export const MsgConnectionOpenConfirm = { - encode( - message: MsgConnectionOpenConfirm, - writer: Writer = Writer.create() - ): Writer { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.proofAck.length !== 0) { - writer.uint32(18).bytes(message.proofAck); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenConfirm { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenConfirm, - } as MsgConnectionOpenConfirm; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.proofAck = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenConfirm { - const message = { - ...baseMsgConnectionOpenConfirm, - } as MsgConnectionOpenConfirm; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = String(object.connectionId); - } else { - message.connectionId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = bytesFromBase64(object.proofAck); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromJSON(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenConfirm): unknown { - const obj: any = {}; - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.proofAck !== undefined && - (obj.proofAck = base64FromBytes( - message.proofAck !== undefined ? message.proofAck : new Uint8Array() - )); - message.proofHeight !== undefined && - (obj.proofHeight = message.proofHeight - ? Height.toJSON(message.proofHeight) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgConnectionOpenConfirm { - const message = { - ...baseMsgConnectionOpenConfirm, - } as MsgConnectionOpenConfirm; - if (object.connectionId !== undefined && object.connectionId !== null) { - message.connectionId = object.connectionId; - } else { - message.connectionId = ""; - } - if (object.proofAck !== undefined && object.proofAck !== null) { - message.proofAck = object.proofAck; - } else { - message.proofAck = new Uint8Array(); - } - if (object.proofHeight !== undefined && object.proofHeight !== null) { - message.proofHeight = Height.fromPartial(object.proofHeight); - } else { - message.proofHeight = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenConfirmResponse: object = {}; - -export const MsgConnectionOpenConfirmResponse = { - encode( - _: MsgConnectionOpenConfirmResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenConfirmResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenConfirmResponse, - } as MsgConnectionOpenConfirmResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenConfirmResponse { - const message = { - ...baseMsgConnectionOpenConfirmResponse, - } as MsgConnectionOpenConfirmResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenConfirmResponse { - const message = { - ...baseMsgConnectionOpenConfirmResponse, - } as MsgConnectionOpenConfirmResponse; - return message; - }, -}; - -/** Msg defines the ibc/connection Msg service. */ -export interface Msg { - /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ - ConnectionOpenInit( - request: MsgConnectionOpenInit - ): Promise; - /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ - ConnectionOpenTry( - request: MsgConnectionOpenTry - ): Promise; - /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ - ConnectionOpenAck( - request: MsgConnectionOpenAck - ): Promise; - /** ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. */ - ConnectionOpenConfirm( - request: MsgConnectionOpenConfirm - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ConnectionOpenInit( - request: MsgConnectionOpenInit - ): Promise { - const data = MsgConnectionOpenInit.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenInit", - data - ); - return promise.then((data) => - MsgConnectionOpenInitResponse.decode(new Reader(data)) - ); - } - - ConnectionOpenTry( - request: MsgConnectionOpenTry - ): Promise { - const data = MsgConnectionOpenTry.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenTry", - data - ); - return promise.then((data) => - MsgConnectionOpenTryResponse.decode(new Reader(data)) - ); - } - - ConnectionOpenAck( - request: MsgConnectionOpenAck - ): Promise { - const data = MsgConnectionOpenAck.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenAck", - data - ); - return promise.then((data) => - MsgConnectionOpenAckResponse.decode(new Reader(data)) - ); - } - - ConnectionOpenConfirm( - request: MsgConnectionOpenConfirm - ): Promise { - const data = MsgConnectionOpenConfirm.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenConfirm", - data - ); - return promise.then((data) => - MsgConnectionOpenConfirmResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/vuex-root deleted file mode 100644 index 0fcc121..0000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/ibc.core.connection.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/index.d.ts b/vue/src/store/generated/index.d.ts deleted file mode 100644 index eed1bc1..0000000 --- a/vue/src/store/generated/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -declare const _default: { - CosmosCosmosSdkCosmosBaseV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosStakingV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosGovV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosCrisisV1Beta1: (store: any) => void; - CosmosCosmosSdkIbcCoreChannelV1: (store: any) => void; - CosmosCosmosSdkCosmosBaseAbciV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosDistributionV1Beta1: (store: any) => void; - CosmosCosmosSdkIbcCoreConnectionV1: (store: any) => void; - CosmosCosmosSdkIbcApplicationsTransferV1: (store: any) => void; - CosmosCosmosSdkCosmosVestingV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosSlashingV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosBankV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosEvidenceV1Beta1: (store: any) => void; - CosmosCosmosSdkIbcCoreClientV1: (store: any) => void; -}; -export default _default; diff --git a/vue/src/store/generated/index.js b/vue/src/store/generated/index.js deleted file mode 100644 index b439939..0000000 --- a/vue/src/store/generated/index.js +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import CosmosCosmosSdkCosmosBaseV1Beta1 from './cosmos/cosmos-sdk/cosmos.base.v1beta1'; -import CosmosCosmosSdkCosmosStakingV1Beta1 from './cosmos/cosmos-sdk/cosmos.staking.v1beta1'; -import CosmosCosmosSdkCosmosGovV1Beta1 from './cosmos/cosmos-sdk/cosmos.gov.v1beta1'; -import CosmosCosmosSdkCosmosCrisisV1Beta1 from './cosmos/cosmos-sdk/cosmos.crisis.v1beta1'; -import CosmosCosmosSdkIbcCoreChannelV1 from './cosmos/cosmos-sdk/ibc.core.channel.v1'; -import CosmosCosmosSdkCosmosBaseAbciV1Beta1 from './cosmos/cosmos-sdk/cosmos.base.abci.v1beta1'; -import CosmosCosmosSdkCosmosDistributionV1Beta1 from './cosmos/cosmos-sdk/cosmos.distribution.v1beta1'; -import CosmosCosmosSdkIbcCoreConnectionV1 from './cosmos/cosmos-sdk/ibc.core.connection.v1'; -import CosmosCosmosSdkIbcApplicationsTransferV1 from './cosmos/cosmos-sdk/ibc.applications.transfer.v1'; -import CosmosCosmosSdkCosmosVestingV1Beta1 from './cosmos/cosmos-sdk/cosmos.vesting.v1beta1'; -import CosmosCosmosSdkCosmosSlashingV1Beta1 from './cosmos/cosmos-sdk/cosmos.slashing.v1beta1'; -import CosmosCosmosSdkCosmosBankV1Beta1 from './cosmos/cosmos-sdk/cosmos.bank.v1beta1'; -import CosmosCosmosSdkCosmosEvidenceV1Beta1 from './cosmos/cosmos-sdk/cosmos.evidence.v1beta1'; -import CosmosCosmosSdkIbcCoreClientV1 from './cosmos/cosmos-sdk/ibc.core.client.v1'; -export default { - CosmosCosmosSdkCosmosBaseV1Beta1: load(CosmosCosmosSdkCosmosBaseV1Beta1, 'cosmos.base.v1beta1'), - CosmosCosmosSdkCosmosStakingV1Beta1: load(CosmosCosmosSdkCosmosStakingV1Beta1, 'cosmos.staking.v1beta1'), - CosmosCosmosSdkCosmosGovV1Beta1: load(CosmosCosmosSdkCosmosGovV1Beta1, 'cosmos.gov.v1beta1'), - CosmosCosmosSdkCosmosCrisisV1Beta1: load(CosmosCosmosSdkCosmosCrisisV1Beta1, 'cosmos.crisis.v1beta1'), - CosmosCosmosSdkIbcCoreChannelV1: load(CosmosCosmosSdkIbcCoreChannelV1, 'ibc.core.channel.v1'), - CosmosCosmosSdkCosmosBaseAbciV1Beta1: load(CosmosCosmosSdkCosmosBaseAbciV1Beta1, 'cosmos.base.abci.v1beta1'), - CosmosCosmosSdkCosmosDistributionV1Beta1: load(CosmosCosmosSdkCosmosDistributionV1Beta1, 'cosmos.distribution.v1beta1'), - CosmosCosmosSdkIbcCoreConnectionV1: load(CosmosCosmosSdkIbcCoreConnectionV1, 'ibc.core.connection.v1'), - CosmosCosmosSdkIbcApplicationsTransferV1: load(CosmosCosmosSdkIbcApplicationsTransferV1, 'ibc.applications.transfer.v1'), - CosmosCosmosSdkCosmosVestingV1Beta1: load(CosmosCosmosSdkCosmosVestingV1Beta1, 'cosmos.vesting.v1beta1'), - CosmosCosmosSdkCosmosSlashingV1Beta1: load(CosmosCosmosSdkCosmosSlashingV1Beta1, 'cosmos.slashing.v1beta1'), - CosmosCosmosSdkCosmosBankV1Beta1: load(CosmosCosmosSdkCosmosBankV1Beta1, 'cosmos.bank.v1beta1'), - CosmosCosmosSdkCosmosEvidenceV1Beta1: load(CosmosCosmosSdkCosmosEvidenceV1Beta1, 'cosmos.evidence.v1beta1'), - CosmosCosmosSdkIbcCoreClientV1: load(CosmosCosmosSdkIbcCoreClientV1, 'ibc.core.client.v1'), -}; -function load(mod, fullns) { - return function init(store) { - const fullnsLevels = fullns.split('/'); - for (let i = 1; i < fullnsLevels.length; i++) { - let ns = fullnsLevels.slice(0, i); - if (!store.hasModule(ns)) { - store.registerModule(ns, { namespaced: true }); - } - } - if (store.hasModule(fullnsLevels)) { - throw new Error('Duplicate module name detected: ' + fullnsLevels.pop()); - } - else { - store.registerModule(fullnsLevels, mod); - store.subscribe((mutation) => { - if (mutation.type == 'common/env/INITIALIZE_WS_COMPLETE') { - store.dispatch(fullns + '/init', null, { - root: true - }); - } - }); - } - }; -} diff --git a/vue/src/store/generated/index.ts b/vue/src/store/generated/index.ts deleted file mode 100644 index c608765..0000000 --- a/vue/src/store/generated/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import CosmosCosmosSdkCosmosBaseV1Beta1 from './cosmos/cosmos-sdk/cosmos.base.v1beta1' -import CosmosCosmosSdkCosmosStakingV1Beta1 from './cosmos/cosmos-sdk/cosmos.staking.v1beta1' -import CosmosCosmosSdkCosmosGovV1Beta1 from './cosmos/cosmos-sdk/cosmos.gov.v1beta1' -import CosmosCosmosSdkCosmosCrisisV1Beta1 from './cosmos/cosmos-sdk/cosmos.crisis.v1beta1' -import CosmosCosmosSdkIbcCoreChannelV1 from './cosmos/cosmos-sdk/ibc.core.channel.v1' -import CosmosCosmosSdkCosmosBaseAbciV1Beta1 from './cosmos/cosmos-sdk/cosmos.base.abci.v1beta1' -import CosmosCosmosSdkCosmosDistributionV1Beta1 from './cosmos/cosmos-sdk/cosmos.distribution.v1beta1' -import CosmosCosmosSdkIbcCoreConnectionV1 from './cosmos/cosmos-sdk/ibc.core.connection.v1' -import CosmosCosmosSdkIbcApplicationsTransferV1 from './cosmos/cosmos-sdk/ibc.applications.transfer.v1' -import CosmosCosmosSdkCosmosVestingV1Beta1 from './cosmos/cosmos-sdk/cosmos.vesting.v1beta1' -import CosmosCosmosSdkCosmosSlashingV1Beta1 from './cosmos/cosmos-sdk/cosmos.slashing.v1beta1' -import CosmosCosmosSdkCosmosBankV1Beta1 from './cosmos/cosmos-sdk/cosmos.bank.v1beta1' -import CosmosCosmosSdkCosmosEvidenceV1Beta1 from './cosmos/cosmos-sdk/cosmos.evidence.v1beta1' -import CosmosCosmosSdkIbcCoreClientV1 from './cosmos/cosmos-sdk/ibc.core.client.v1' - - -export default { - CosmosCosmosSdkCosmosBaseV1Beta1: load(CosmosCosmosSdkCosmosBaseV1Beta1, 'cosmos.base.v1beta1'), - CosmosCosmosSdkCosmosStakingV1Beta1: load(CosmosCosmosSdkCosmosStakingV1Beta1, 'cosmos.staking.v1beta1'), - CosmosCosmosSdkCosmosGovV1Beta1: load(CosmosCosmosSdkCosmosGovV1Beta1, 'cosmos.gov.v1beta1'), - CosmosCosmosSdkCosmosCrisisV1Beta1: load(CosmosCosmosSdkCosmosCrisisV1Beta1, 'cosmos.crisis.v1beta1'), - CosmosCosmosSdkIbcCoreChannelV1: load(CosmosCosmosSdkIbcCoreChannelV1, 'ibc.core.channel.v1'), - CosmosCosmosSdkCosmosBaseAbciV1Beta1: load(CosmosCosmosSdkCosmosBaseAbciV1Beta1, 'cosmos.base.abci.v1beta1'), - CosmosCosmosSdkCosmosDistributionV1Beta1: load(CosmosCosmosSdkCosmosDistributionV1Beta1, 'cosmos.distribution.v1beta1'), - CosmosCosmosSdkIbcCoreConnectionV1: load(CosmosCosmosSdkIbcCoreConnectionV1, 'ibc.core.connection.v1'), - CosmosCosmosSdkIbcApplicationsTransferV1: load(CosmosCosmosSdkIbcApplicationsTransferV1, 'ibc.applications.transfer.v1'), - CosmosCosmosSdkCosmosVestingV1Beta1: load(CosmosCosmosSdkCosmosVestingV1Beta1, 'cosmos.vesting.v1beta1'), - CosmosCosmosSdkCosmosSlashingV1Beta1: load(CosmosCosmosSdkCosmosSlashingV1Beta1, 'cosmos.slashing.v1beta1'), - CosmosCosmosSdkCosmosBankV1Beta1: load(CosmosCosmosSdkCosmosBankV1Beta1, 'cosmos.bank.v1beta1'), - CosmosCosmosSdkCosmosEvidenceV1Beta1: load(CosmosCosmosSdkCosmosEvidenceV1Beta1, 'cosmos.evidence.v1beta1'), - CosmosCosmosSdkIbcCoreClientV1: load(CosmosCosmosSdkIbcCoreClientV1, 'ibc.core.client.v1'), - -} - - -function load(mod, fullns) { - return function init(store) { - const fullnsLevels = fullns.split('/') - for (let i = 1; i < fullnsLevels.length; i++) { - let ns = fullnsLevels.slice(0, i) - if (!store.hasModule(ns)) { - store.registerModule(ns, { namespaced: true }) - } - } - if (store.hasModule(fullnsLevels)) { - throw new Error('Duplicate module name detected: '+ fullnsLevels.pop()) - }else{ - store.registerModule(fullnsLevels, mod) - store.subscribe((mutation) => { - if (mutation.type == 'common/env/INITIALIZE_WS_COMPLETE') { - store.dispatch(fullns+ '/init', null, { - root: true - }) - } - }) - } - } -} diff --git a/vue/src/store/generated/readme.md b/vue/src/store/generated/readme.md deleted file mode 100644 index a9a292f..0000000 --- a/vue/src/store/generated/readme.md +++ /dev/null @@ -1 +0,0 @@ -THIS FOLDER IS GENERATED AUTOMATICALLY. DO NOT MODIFY. diff --git a/vue/src/store/index.js b/vue/src/store/index.js deleted file mode 100644 index c452ff3..0000000 --- a/vue/src/store/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createStore } from 'vuex' -import init from './config' - -const store = createStore({ - state() { - return {} - }, - mutations: {}, - actions: {}, -}) -init(store) -export default store diff --git a/vue/src/views/Index.vue b/vue/src/views/Index.vue deleted file mode 100644 index 154d4c3..0000000 --- a/vue/src/views/Index.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/vue/src/views/Types.vue b/vue/src/views/Types.vue deleted file mode 100644 index a57fc6a..0000000 --- a/vue/src/views/Types.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/vue/vue.config.js b/vue/vue.config.js deleted file mode 100644 index 7b9778c..0000000 --- a/vue/vue.config.js +++ /dev/null @@ -1,15 +0,0 @@ -const path = require('path') - -module.exports = { - devServer: { - disableHostCheck: true, - }, - configureWebpack: { - resolve: { - symlinks: false, - alias: { - vue$: path.resolve('./node_modules/vue/dist/vue.esm-bundler.js') - } - } - } -} \ No newline at end of file diff --git a/x/bech32ibc/keeper/gov_test.go b/x/bech32ibc/keeper/gov_test.go index 186a9eb..8c2a6b4 100644 --- a/x/bech32ibc/keeper/gov_test.go +++ b/x/bech32ibc/keeper/gov_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" ) diff --git a/x/bech32ibc/keeper/keeper.go b/x/bech32ibc/keeper/keeper.go index 056090b..8cc7a95 100644 --- a/x/bech32ibc/keeper/keeper.go +++ b/x/bech32ibc/keeper/keeper.go @@ -3,10 +3,10 @@ package keeper import ( "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/log" "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" ) diff --git a/x/bech32ibc/keeper/query.go b/x/bech32ibc/keeper/query.go deleted file mode 100644 index 6a45a31..0000000 --- a/x/bech32ibc/keeper/query.go +++ /dev/null @@ -1,26 +0,0 @@ -package keeper - -import ( - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" - - abci "github.com/tendermint/tendermint/abci/types" -) - -func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - var ( - res []byte - err error - ) - - switch path[0] { - default: - err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) - } - - return res, err - } -} diff --git a/x/bech32ibc/keeper/records_test.go b/x/bech32ibc/keeper/records_test.go index ce5290a..e156abd 100644 --- a/x/bech32ibc/keeper/records_test.go +++ b/x/bech32ibc/keeper/records_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" ) @@ -79,10 +79,10 @@ func (suite *KeeperTestSuite) TestHrpIbcRecordsLifeCycle() { suite.Require().Len(hrpIbcRecords, 2) // Check getting individually - hrpIbcRecord, err := suite.app.Bech32IBCKeeper.GetHrpIbcRecord(suite.ctx, "cosmos") + _, err := suite.app.Bech32IBCKeeper.GetHrpIbcRecord(suite.ctx, "cosmos") suite.Require().Error(err) - hrpIbcRecord, err = suite.app.Bech32IBCKeeper.GetHrpIbcRecord(suite.ctx, "akash") + hrpIbcRecord, err := suite.app.Bech32IBCKeeper.GetHrpIbcRecord(suite.ctx, "akash") suite.Require().Equal(hrpIbcRecord, types.HrpIbcRecord{ Hrp: "akash", SourceChannel: "channel-1", diff --git a/x/bech32ibc/module.go b/x/bech32ibc/module.go index fe5c95d..a34d5d8 100644 --- a/x/bech32ibc/module.go +++ b/x/bech32ibc/module.go @@ -7,7 +7,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -106,19 +106,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewQuerier(am.keeper, legacyQuerierCdc) -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/bech32ibc/types/expected_keepers.go b/x/bech32ibc/types/expected_keepers.go index d62a797..6e2eb4c 100644 --- a/x/bech32ibc/types/expected_keepers.go +++ b/x/bech32ibc/types/expected_keepers.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) // ChannelKeeper defines the expected IBC channel keeper diff --git a/x/bech32ibc/types/genesis.pb.go b/x/bech32ibc/types/genesis.pb.go index cfb69b6..e07dc15 100644 --- a/x/bech32ibc/types/genesis.pb.go +++ b/x/bech32ibc/types/genesis.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bech32ibc/v1beta1/genesis.proto +// source: bech32ibc/bech32ibc/v1beta1/genesis.proto package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -32,7 +32,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_cbed8723d81acddf, []int{0} + return fileDescriptor_88e86c6c06f73d91, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,28 +79,30 @@ func init() { proto.RegisterType((*GenesisState)(nil), "bech32ibc.bech32ibc.v1beta1.GenesisState") } -func init() { proto.RegisterFile("bech32ibc/v1beta1/genesis.proto", fileDescriptor_cbed8723d81acddf) } +func init() { + proto.RegisterFile("bech32ibc/bech32ibc/v1beta1/genesis.proto", fileDescriptor_88e86c6c06f73d91) +} -var fileDescriptor_cbed8723d81acddf = []byte{ +var fileDescriptor_88e86c6c06f73d91 = []byte{ // 280 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4a, 0x4d, 0xce, - 0x30, 0x36, 0xca, 0x4c, 0x4a, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, - 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x86, 0x2b, 0xd0, - 0x43, 0xb0, 0xa0, 0x4a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xea, 0xf4, 0x41, 0x2c, 0x88, - 0x16, 0x29, 0x59, 0x4c, 0x33, 0x4b, 0x2a, 0x0b, 0x52, 0xa1, 0x26, 0x2a, 0x6d, 0x61, 0xe4, 0xe2, - 0x71, 0x87, 0xd8, 0x11, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x64, 0xcc, 0xc5, 0x99, 0x97, 0x58, 0x92, - 0x59, 0x96, 0xea, 0x11, 0x14, 0x20, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xfa, 0xe9, 0x9e, - 0xbc, 0x60, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0x44, 0x2a, 0x3e, 0xa3, 0xa8, 0x40, 0x29, 0x08, - 0xa1, 0x4e, 0x28, 0x9f, 0x8b, 0x37, 0xa3, 0xa8, 0xc0, 0xd3, 0xc9, 0x39, 0x28, 0x35, 0x39, 0xbf, - 0x28, 0xa5, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x53, 0x0f, 0x8f, 0x7b, 0xf5, 0x3c, - 0x8a, 0x0a, 0x3c, 0x93, 0x92, 0x21, 0x3a, 0x9c, 0xe4, 0x4e, 0xdc, 0x93, 0x67, 0xf8, 0x74, 0x4f, - 0x5e, 0x0c, 0x62, 0x4f, 0x46, 0x51, 0x41, 0x7c, 0x66, 0x52, 0x72, 0x7c, 0x11, 0xc4, 0x3c, 0xa5, - 0x20, 0x54, 0xf3, 0x9d, 0xfc, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, - 0x24, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0xbf, 0x38, 0x37, 0xbf, - 0x38, 0xb3, 0x58, 0x37, 0x27, 0x31, 0xa9, 0x58, 0x1f, 0xe2, 0x00, 0x5d, 0x50, 0x40, 0x54, 0xe8, - 0x23, 0x02, 0x05, 0x1c, 0x18, 0x49, 0x6c, 0xe0, 0xd0, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, - 0x7e, 0xd5, 0x4c, 0x83, 0x82, 0x01, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4c, 0x4a, 0x4d, 0xce, + 0x30, 0x36, 0xca, 0x4c, 0x4a, 0xd6, 0x47, 0xb0, 0xca, 0x0c, 0x93, 0x52, 0x4b, 0x12, 0x0d, 0xf5, + 0xd3, 0x53, 0xf3, 0x52, 0x8b, 0x33, 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xa4, 0xe1, + 0x0a, 0xf4, 0x10, 0x2c, 0xa8, 0x52, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0xb0, 0x3a, 0x7d, 0x10, + 0x0b, 0xa2, 0x45, 0x4a, 0x1d, 0x9f, 0xe9, 0x25, 0x95, 0x05, 0xa9, 0x50, 0xb3, 0x95, 0xb6, 0x30, + 0x72, 0xf1, 0xb8, 0x43, 0x6c, 0x0b, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x32, 0xe6, 0xe2, 0xcc, 0x4b, + 0x2c, 0xc9, 0x2c, 0x4b, 0xf5, 0x08, 0x0a, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x12, 0xfd, + 0x74, 0x4f, 0x5e, 0xb0, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x22, 0x15, 0x9f, 0x51, 0x54, 0xa0, + 0x14, 0x84, 0x50, 0x27, 0x94, 0xcf, 0xc5, 0x9b, 0x51, 0x54, 0xe0, 0xe9, 0xe4, 0x1c, 0x94, 0x9a, + 0x9c, 0x5f, 0x94, 0x52, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa9, 0x87, 0xc7, 0xe5, + 0x7a, 0x1e, 0x45, 0x05, 0x9e, 0x49, 0xc9, 0x10, 0x1d, 0x4e, 0x72, 0x27, 0xee, 0xc9, 0x33, 0x7c, + 0xba, 0x27, 0x2f, 0x06, 0xb1, 0x27, 0xa3, 0xa8, 0x20, 0x3e, 0x33, 0x29, 0x39, 0xbe, 0x08, 0x62, + 0x9e, 0x52, 0x10, 0xaa, 0xf9, 0x4e, 0x7e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, + 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, + 0x10, 0x65, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x5f, 0x9c, + 0x9b, 0x5f, 0x9c, 0x59, 0xac, 0x9b, 0x93, 0x98, 0x54, 0x0c, 0x0d, 0x07, 0x5d, 0x50, 0x40, 0x54, + 0x20, 0x05, 0x0a, 0x38, 0x30, 0x92, 0xd8, 0xc0, 0xa1, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, + 0x22, 0x8e, 0x19, 0xd9, 0x96, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -284,10 +286,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenesis } if (iNdEx + skippy) > l { diff --git a/x/bech32ibc/types/gov.pb.go b/x/bech32ibc/types/gov.pb.go index 8930e53..a914fab 100644 --- a/x/bech32ibc/types/gov.pb.go +++ b/x/bech32ibc/types/gov.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bech32ibc/v1beta1/gov.proto +// source: bech32ibc/bech32ibc/v1beta1/gov.proto package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" io "io" math "math" math_bits "math/bits" @@ -44,7 +44,7 @@ type UpdateHrpIbcChannelProposal struct { func (m *UpdateHrpIbcChannelProposal) Reset() { *m = UpdateHrpIbcChannelProposal{} } func (*UpdateHrpIbcChannelProposal) ProtoMessage() {} func (*UpdateHrpIbcChannelProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_8f7c8abba2b4a209, []int{0} + return fileDescriptor_bf6e7d1bc9626a38, []int{0} } func (m *UpdateHrpIbcChannelProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,39 +77,41 @@ func init() { proto.RegisterType((*UpdateHrpIbcChannelProposal)(nil), "bech32ibc.bech32ibc.v1beta1.UpdateHrpIbcChannelProposal") } -func init() { proto.RegisterFile("bech32ibc/v1beta1/gov.proto", fileDescriptor_8f7c8abba2b4a209) } +func init() { + proto.RegisterFile("bech32ibc/bech32ibc/v1beta1/gov.proto", fileDescriptor_bf6e7d1bc9626a38) +} -var fileDescriptor_8f7c8abba2b4a209 = []byte{ - // 450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x31, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0xcf, 0xa4, 0xad, 0x84, 0x5b, 0x0a, 0x58, 0x05, 0x5d, 0x5b, 0x71, 0x8e, 0x6e, 0x40, - 0x19, 0xe8, 0x59, 0x6d, 0x19, 0x50, 0x25, 0x24, 0x14, 0x18, 0xca, 0x02, 0xe8, 0x54, 0x16, 0x96, - 0xe8, 0xce, 0x71, 0xee, 0x2c, 0xdd, 0xe5, 0x59, 0x67, 0xa7, 0x22, 0x1f, 0x00, 0x89, 0x91, 0xb1, - 0x63, 0x66, 0x3e, 0x49, 0xc7, 0x8e, 0x4c, 0x07, 0x4a, 0x16, 0xc4, 0x98, 0x4f, 0x80, 0x62, 0x5f, - 0x95, 0x44, 0xdd, 0x6c, 0xff, 0x7e, 0x7f, 0xeb, 0xbd, 0xa7, 0x87, 0x0f, 0x53, 0xc1, 0xf3, 0xd3, - 0x13, 0x99, 0x72, 0x76, 0x79, 0x9c, 0x0a, 0x93, 0x1c, 0xb3, 0x0c, 0x2e, 0x23, 0x55, 0x81, 0x01, - 0xb2, 0x84, 0xd1, 0xf2, 0xd4, 0x68, 0x07, 0x7b, 0x19, 0x64, 0x60, 0x3d, 0xb6, 0x38, 0xb9, 0xc8, - 0xc1, 0xb3, 0xbb, 0xff, 0x99, 0xb1, 0x12, 0xba, 0xc1, 0x41, 0x06, 0x90, 0x15, 0x82, 0xd9, 0x5b, - 0x3a, 0x1a, 0xb0, 0xfe, 0xa8, 0x4a, 0x8c, 0x84, 0xa1, 0xe3, 0xe1, 0xcf, 0x16, 0x3e, 0xfc, 0xac, - 0xfa, 0x89, 0x11, 0xe7, 0x95, 0x7a, 0x9f, 0xf2, 0xb7, 0x79, 0x32, 0x1c, 0x8a, 0xe2, 0x53, 0x05, - 0x0a, 0x74, 0x52, 0x90, 0xe7, 0x78, 0xd3, 0x48, 0x53, 0x08, 0x1f, 0xb5, 0x51, 0xe7, 0x7e, 0xf7, - 0xd1, 0xbc, 0xa6, 0x3b, 0xe3, 0xa4, 0x2c, 0xce, 0x42, 0xfb, 0x1c, 0xc6, 0x0e, 0x93, 0x57, 0x78, - 0xbb, 0x2f, 0x34, 0xaf, 0xa4, 0x5a, 0x7c, 0xee, 0xdf, 0xb3, 0xf6, 0xd3, 0x79, 0x4d, 0x89, 0xb3, - 0x57, 0x60, 0x18, 0xaf, 0xaa, 0xa4, 0x8d, 0x5b, 0x79, 0xa5, 0xfc, 0x96, 0x4d, 0xec, 0xce, 0x6b, - 0x8a, 0x5d, 0x22, 0xaf, 0x54, 0x18, 0x2f, 0x10, 0x79, 0x83, 0x77, 0x35, 0x8c, 0x2a, 0x2e, 0x7a, - 0xdc, 0x55, 0xe7, 0x6f, 0x58, 0x79, 0x7f, 0x5e, 0xd3, 0x27, 0x4e, 0x5e, 0xe7, 0x61, 0xfc, 0xc0, - 0x3d, 0x34, 0xdd, 0x10, 0x86, 0xf7, 0x24, 0xd7, 0x3d, 0x03, 0xbd, 0x5c, 0xc8, 0x2c, 0x37, 0x3d, - 0x18, 0x0c, 0xb4, 0x30, 0xfe, 0x66, 0x1b, 0x75, 0x36, 0xe2, 0xc7, 0x92, 0xeb, 0x0b, 0x38, 0xb7, - 0xe4, 0xa3, 0x05, 0xe4, 0x1b, 0xc2, 0xa4, 0x49, 0x18, 0x59, 0x8a, 0x5b, 0x7f, 0xab, 0x8d, 0x3a, - 0xdb, 0x27, 0xfb, 0x91, 0x1b, 0x6a, 0x74, 0x3b, 0xd4, 0xe8, 0x5d, 0x33, 0xd4, 0xee, 0xeb, 0xeb, - 0x9a, 0x7a, 0xff, 0x6a, 0xea, 0xaf, 0x07, 0x5f, 0x40, 0x29, 0x8d, 0x28, 0x95, 0x19, 0x2f, 0x4b, - 0x5e, 0x37, 0xc2, 0xab, 0xdf, 0x14, 0xc5, 0x0f, 0x6d, 0x25, 0x17, 0xb2, 0x14, 0xae, 0x8e, 0xb3, - 0x9d, 0xef, 0x13, 0xea, 0x5d, 0x4d, 0xa8, 0xf7, 0x77, 0x42, 0x51, 0xf7, 0xc3, 0xf5, 0x34, 0x40, - 0x37, 0xd3, 0x00, 0xfd, 0x99, 0x06, 0xe8, 0xc7, 0x2c, 0xf0, 0x6e, 0x66, 0x81, 0xf7, 0x6b, 0x16, - 0x78, 0x5f, 0x5e, 0x66, 0xd2, 0xe4, 0xa3, 0x34, 0xe2, 0x50, 0x32, 0xd0, 0x25, 0x68, 0xa9, 0x8f, - 0x8a, 0x24, 0xd5, 0xcc, 0x6d, 0xc7, 0xd1, 0x62, 0x3d, 0xbe, 0xb2, 0xe5, 0xaa, 0xd8, 0x15, 0x49, - 0xb7, 0x6c, 0x03, 0xa7, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x69, 0x01, 0x6c, 0x62, 0x94, 0x02, - 0x00, 0x00, +var fileDescriptor_bf6e7d1bc9626a38 = []byte{ + // 453 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0xa4, 0xad, 0xc4, 0xb5, 0x14, 0x38, 0x15, 0xe4, 0xb6, 0x92, 0x2f, 0xb2, 0x04, + 0x64, 0xa0, 0xb6, 0xda, 0x32, 0xa0, 0x4a, 0x48, 0x28, 0x30, 0x94, 0x05, 0x90, 0x55, 0x16, 0x96, + 0xc8, 0xbe, 0x5c, 0xec, 0x93, 0xec, 0xbc, 0x93, 0xef, 0x52, 0x91, 0x0f, 0x80, 0xc4, 0xc8, 0xd8, + 0x31, 0x33, 0x9f, 0xa4, 0x63, 0x47, 0x26, 0x83, 0x92, 0x05, 0x31, 0xe6, 0x13, 0x20, 0xdf, 0x39, + 0x24, 0x59, 0xba, 0xbd, 0xbb, 0xdf, 0xef, 0x7f, 0x7a, 0xf7, 0xf4, 0xf0, 0x93, 0x84, 0xb3, 0xec, + 0xf4, 0x44, 0x24, 0x2c, 0x5c, 0x56, 0x97, 0xc7, 0x09, 0xd7, 0xf1, 0x71, 0x98, 0xc2, 0x65, 0x20, + 0x4b, 0xd0, 0x40, 0x0e, 0xff, 0xc3, 0x60, 0x59, 0x35, 0xda, 0xc1, 0x5e, 0x0a, 0x29, 0x18, 0x2f, + 0xac, 0x2b, 0x1b, 0x39, 0x78, 0x76, 0xdb, 0xcb, 0x7a, 0x2c, 0xb9, 0x6a, 0x44, 0x2f, 0x05, 0x48, + 0x73, 0x1e, 0x9a, 0x53, 0x32, 0x1a, 0x84, 0xfd, 0x51, 0x19, 0x6b, 0x01, 0x43, 0xcb, 0xfd, 0x1f, + 0x2d, 0x7c, 0xf8, 0x49, 0xf6, 0x63, 0xcd, 0xcf, 0x4b, 0xf9, 0x2e, 0x61, 0x6f, 0xb2, 0x78, 0x38, + 0xe4, 0xf9, 0xc7, 0x12, 0x24, 0xa8, 0x38, 0x27, 0x4f, 0xf1, 0xa6, 0x16, 0x3a, 0xe7, 0x2e, 0x6a, + 0xa3, 0xce, 0xdd, 0xee, 0x83, 0x79, 0x45, 0x77, 0xc6, 0x71, 0x91, 0x9f, 0xf9, 0xe6, 0xda, 0x8f, + 0x2c, 0x26, 0x2f, 0xf1, 0x76, 0x9f, 0x2b, 0x56, 0x0a, 0x59, 0x3f, 0xee, 0xde, 0x31, 0xf6, 0xe3, + 0x79, 0x45, 0x89, 0xb5, 0x57, 0xa0, 0x1f, 0xad, 0xaa, 0xa4, 0x8d, 0x5b, 0x59, 0x29, 0xdd, 0x96, + 0x49, 0xec, 0xce, 0x2b, 0x8a, 0x6d, 0x22, 0x2b, 0xa5, 0x1f, 0xd5, 0x88, 0xbc, 0xc6, 0xbb, 0x0a, + 0x46, 0x25, 0xe3, 0x3d, 0x66, 0xbb, 0x73, 0x37, 0x8c, 0xbc, 0x3f, 0xaf, 0xe8, 0x23, 0x2b, 0xaf, + 0x73, 0x3f, 0xba, 0x67, 0x2f, 0x9a, 0xdf, 0x90, 0x10, 0xef, 0x09, 0xa6, 0x7a, 0x1a, 0x7a, 0x19, + 0x17, 0x69, 0xa6, 0x7b, 0x30, 0x18, 0x28, 0xae, 0xdd, 0xcd, 0x36, 0xea, 0x6c, 0x44, 0x0f, 0x05, + 0x53, 0x17, 0x70, 0x6e, 0xc8, 0x07, 0x03, 0xc8, 0x57, 0x84, 0x49, 0x93, 0xd0, 0xa2, 0xe0, 0x0b, + 0x7f, 0xab, 0x8d, 0x3a, 0xdb, 0x27, 0xfb, 0x81, 0x1d, 0x6a, 0xb0, 0x18, 0x6a, 0xf0, 0xb6, 0x19, + 0x6a, 0xf7, 0xd5, 0x75, 0x45, 0x9d, 0xbf, 0x15, 0x75, 0xd7, 0x83, 0xcf, 0xa1, 0x10, 0x9a, 0x17, + 0x52, 0x8f, 0x97, 0x2d, 0xaf, 0x1b, 0xfe, 0xd5, 0x2f, 0x8a, 0xa2, 0xfb, 0xa6, 0x93, 0x0b, 0x51, + 0x70, 0xdb, 0xc7, 0xd9, 0xce, 0xb7, 0x09, 0x75, 0xae, 0x26, 0xd4, 0xf9, 0x33, 0xa1, 0xa8, 0xfb, + 0xfe, 0x7a, 0xea, 0xa1, 0x9b, 0xa9, 0x87, 0x7e, 0x4f, 0x3d, 0xf4, 0x7d, 0xe6, 0x39, 0x37, 0x33, + 0xcf, 0xf9, 0x39, 0xf3, 0x9c, 0xcf, 0x2f, 0x52, 0xa1, 0xb3, 0x51, 0x12, 0x30, 0x28, 0x42, 0x50, + 0x05, 0x28, 0xa1, 0x8e, 0xf2, 0x38, 0x51, 0xcd, 0x76, 0x1c, 0xd5, 0xeb, 0xf1, 0x65, 0x65, 0x55, + 0xcc, 0x8a, 0x24, 0x5b, 0xe6, 0x03, 0xa7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x45, 0x8b, + 0xae, 0xa8, 0x02, 0x00, 0x00, } func (this *UpdateHrpIbcChannelProposal) Equal(that interface{}) bool { @@ -171,7 +173,7 @@ func (m *UpdateHrpIbcChannelProposal) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.IcsToTimeOffset, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.IcsToTimeOffset):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.IcsToTimeOffset, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.IcsToTimeOffset):]) if err1 != nil { return 0, err1 } @@ -251,7 +253,7 @@ func (m *UpdateHrpIbcChannelProposal) Size() (n int) { if m.IcsToHeightOffset != 0 { n += 1 + sovGov(uint64(m.IcsToHeightOffset)) } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.IcsToTimeOffset) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.IcsToTimeOffset) n += 1 + l + sovGov(uint64(l)) return n } @@ -467,7 +469,7 @@ func (m *UpdateHrpIbcChannelProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.IcsToTimeOffset, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.IcsToTimeOffset, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -477,10 +479,7 @@ func (m *UpdateHrpIbcChannelProposal) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGov } if (iNdEx + skippy) > l { diff --git a/x/bech32ibc/types/query.pb.go b/x/bech32ibc/types/query.pb.go index f544276..f14a2a1 100644 --- a/x/bech32ibc/types/query.pb.go +++ b/x/bech32ibc/types/query.pb.go @@ -1,19 +1,19 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bech32ibc/v1beta1/query.proto +// source: bech32ibc/bech32ibc/v1beta1/query.proto package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/durationpb" io "io" math "math" math_bits "math/bits" @@ -37,7 +37,7 @@ func (m *QueryHrpIbcRecordsRequest) Reset() { *m = QueryHrpIbcRecordsReq func (m *QueryHrpIbcRecordsRequest) String() string { return proto.CompactTextString(m) } func (*QueryHrpIbcRecordsRequest) ProtoMessage() {} func (*QueryHrpIbcRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_004dff02d981ce19, []int{0} + return fileDescriptor_10bb4093eff1d106, []int{0} } func (m *QueryHrpIbcRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ func (m *QueryHrpIbcRecordsResponse) Reset() { *m = QueryHrpIbcRecordsRe func (m *QueryHrpIbcRecordsResponse) String() string { return proto.CompactTextString(m) } func (*QueryHrpIbcRecordsResponse) ProtoMessage() {} func (*QueryHrpIbcRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_004dff02d981ce19, []int{1} + return fileDescriptor_10bb4093eff1d106, []int{1} } func (m *QueryHrpIbcRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -118,7 +118,7 @@ func (m *QueryHrpIbcRecordRequest) Reset() { *m = QueryHrpIbcRecordReque func (m *QueryHrpIbcRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryHrpIbcRecordRequest) ProtoMessage() {} func (*QueryHrpIbcRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_004dff02d981ce19, []int{2} + return fileDescriptor_10bb4093eff1d106, []int{2} } func (m *QueryHrpIbcRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ func (m *QueryHrpIbcRecordResponse) Reset() { *m = QueryHrpIbcRecordResp func (m *QueryHrpIbcRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryHrpIbcRecordResponse) ProtoMessage() {} func (*QueryHrpIbcRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_004dff02d981ce19, []int{3} + return fileDescriptor_10bb4093eff1d106, []int{3} } func (m *QueryHrpIbcRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -205,7 +205,7 @@ func (m *QueryNativeHrpRequest) Reset() { *m = QueryNativeHrpRequest{} } func (m *QueryNativeHrpRequest) String() string { return proto.CompactTextString(m) } func (*QueryNativeHrpRequest) ProtoMessage() {} func (*QueryNativeHrpRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_004dff02d981ce19, []int{4} + return fileDescriptor_10bb4093eff1d106, []int{4} } func (m *QueryNativeHrpRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ func (m *QueryNativeHrpResponse) Reset() { *m = QueryNativeHrpResponse{} func (m *QueryNativeHrpResponse) String() string { return proto.CompactTextString(m) } func (*QueryNativeHrpResponse) ProtoMessage() {} func (*QueryNativeHrpResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_004dff02d981ce19, []int{5} + return fileDescriptor_10bb4093eff1d106, []int{5} } func (m *QueryNativeHrpResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -287,44 +287,46 @@ func init() { proto.RegisterType((*QueryNativeHrpResponse)(nil), "bech32ibc.bech32ibc.v1beta1.QueryNativeHrpResponse") } -func init() { proto.RegisterFile("bech32ibc/v1beta1/query.proto", fileDescriptor_004dff02d981ce19) } +func init() { + proto.RegisterFile("bech32ibc/bech32ibc/v1beta1/query.proto", fileDescriptor_10bb4093eff1d106) +} -var fileDescriptor_004dff02d981ce19 = []byte{ - // 531 bytes of a gzipped FileDescriptorProto +var fileDescriptor_10bb4093eff1d106 = []byte{ + // 532 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xb1, 0x6e, 0xd3, 0x40, - 0x18, 0xc7, 0x73, 0x14, 0x90, 0x72, 0xb4, 0x45, 0x9c, 0x48, 0x09, 0x2e, 0x75, 0xa2, 0x13, 0x12, + 0x18, 0xc7, 0x73, 0x14, 0x90, 0x72, 0xb4, 0x45, 0x9c, 0x48, 0x09, 0x2e, 0x38, 0xd1, 0x09, 0xa9, 0x2d, 0x52, 0x7d, 0xd4, 0x29, 0x05, 0x21, 0xa6, 0x4c, 0x65, 0x89, 0x84, 0x47, 0x96, 0xc8, 0x76, 0xaf, 0xb6, 0xa5, 0xc4, 0xe7, 0xdc, 0xd9, 0x55, 0x23, 0xc4, 0xc2, 0xca, 0x00, 0x12, 0x0b, 0x23, - 0xaf, 0xc0, 0xc4, 0x2b, 0x74, 0xac, 0xc4, 0xc2, 0x14, 0xa1, 0x84, 0x27, 0xc8, 0x13, 0xa0, 0x9c, - 0x2f, 0x76, 0x1a, 0x92, 0x54, 0xde, 0x2e, 0xf9, 0xdf, 0xf7, 0xff, 0x7e, 0x7f, 0xdf, 0xa7, 0x0f, - 0xee, 0x38, 0xd4, 0xf5, 0x1b, 0x66, 0xe0, 0xb8, 0xe4, 0xec, 0xc0, 0xa1, 0xb1, 0x7d, 0x40, 0x7a, - 0x09, 0xe5, 0x7d, 0x23, 0xe2, 0x2c, 0x66, 0x68, 0x3b, 0x93, 0x8d, 0xfc, 0xa4, 0x2e, 0x6a, 0xf7, - 0x3d, 0xe6, 0x31, 0x79, 0x8f, 0x4c, 0x4e, 0x69, 0x89, 0xf6, 0xc8, 0x63, 0xcc, 0xeb, 0x50, 0x62, - 0x47, 0x01, 0xb1, 0xc3, 0x90, 0xc5, 0x76, 0x1c, 0xb0, 0x50, 0x28, 0x55, 0x57, 0xaa, 0xfc, 0xe5, - 0x24, 0xa7, 0xe4, 0x24, 0xe1, 0xf2, 0x82, 0xd2, 0x17, 0xf0, 0xc4, 0xfd, 0x88, 0xaa, 0x72, 0xbc, - 0x0d, 0x1f, 0xbe, 0x9d, 0xe0, 0x1d, 0xf3, 0xe8, 0x8d, 0xe3, 0x5a, 0xd4, 0x65, 0xfc, 0x44, 0x58, - 0xb4, 0x97, 0x50, 0x11, 0xe3, 0xcf, 0x00, 0x6a, 0x8b, 0x54, 0x11, 0xb1, 0x50, 0x50, 0xd4, 0x83, - 0x77, 0x7d, 0x1e, 0xb5, 0x03, 0xc7, 0x6d, 0xf3, 0x54, 0xaa, 0x82, 0xfa, 0xda, 0xee, 0x1d, 0x73, - 0xcf, 0x58, 0x91, 0xd2, 0x98, 0x35, 0x6b, 0xea, 0x17, 0x83, 0x5a, 0x69, 0x3c, 0xa8, 0x6d, 0xf5, - 0xed, 0x6e, 0xe7, 0x15, 0x9e, 0xf3, 0xc3, 0xd6, 0x86, 0x3f, 0xdb, 0x1a, 0xbf, 0x86, 0xd5, 0xff, - 0x80, 0x14, 0x2d, 0xaa, 0xc3, 0x35, 0x9f, 0x47, 0x55, 0x50, 0x07, 0xbb, 0xe5, 0xe6, 0xe6, 0x78, - 0x50, 0x83, 0x99, 0x27, 0xb6, 0x26, 0x12, 0xfe, 0x04, 0x16, 0xa4, 0xcd, 0xe2, 0x84, 0x70, 0xf3, - 0x6a, 0x7b, 0x69, 0x55, 0x28, 0xcd, 0x8e, 0x4a, 0x53, 0x59, 0x94, 0x06, 0x5b, 0xeb, 0xb3, 0x61, - 0xf0, 0x03, 0x58, 0x91, 0x30, 0x2d, 0x3b, 0x0e, 0xce, 0xe8, 0x31, 0x8f, 0xa6, 0x9f, 0xbd, 0x05, - 0xb7, 0xe6, 0x05, 0x85, 0x78, 0x08, 0x61, 0x28, 0xff, 0x6c, 0xe7, 0x49, 0x2b, 0xe3, 0x41, 0xed, - 0x5e, 0xda, 0x2f, 0xd7, 0xb0, 0x55, 0x0e, 0xa7, 0xd5, 0xe6, 0xb7, 0x9b, 0xf0, 0x96, 0x34, 0x44, - 0x3f, 0x00, 0xdc, 0xb8, 0xf2, 0x96, 0xe8, 0x68, 0x65, 0xb8, 0xa5, 0xa3, 0xa1, 0xbd, 0x28, 0x5c, - 0x97, 0x46, 0xc0, 0xe4, 0xe3, 0xaf, 0xbf, 0x5f, 0x6f, 0xec, 0xa1, 0x27, 0x84, 0x89, 0x2e, 0x13, - 0x81, 0x20, 0xf1, 0xf9, 0x29, 0xa5, 0x22, 0x9b, 0xce, 0xb9, 0x11, 0x40, 0x3f, 0x01, 0x5c, 0x9f, - 0xb5, 0x42, 0xcf, 0x8b, 0xb5, 0x9e, 0x12, 0x1f, 0x15, 0x2d, 0x53, 0xc0, 0x2f, 0x25, 0xb0, 0x89, - 0x9e, 0xad, 0x02, 0x16, 0x2c, 0xe1, 0x2e, 0x6d, 0xbb, 0xbe, 0x1d, 0x86, 0xb4, 0x43, 0xde, 0xfb, - 0x3c, 0xfa, 0x80, 0xbe, 0x03, 0x58, 0xce, 0xde, 0x10, 0x99, 0xd7, 0xf7, 0x9f, 0x9f, 0x04, 0xad, - 0x51, 0xa8, 0x46, 0x01, 0x3f, 0x95, 0xc0, 0x8f, 0x11, 0x5e, 0x06, 0x9c, 0x8f, 0x49, 0xb3, 0x75, - 0x31, 0xd4, 0xc1, 0xe5, 0x50, 0x07, 0x7f, 0x86, 0x3a, 0xf8, 0x32, 0xd2, 0x4b, 0x97, 0x23, 0xbd, - 0xf4, 0x7b, 0xa4, 0x97, 0xde, 0x1d, 0x7a, 0x41, 0xec, 0x27, 0x8e, 0xe1, 0xb2, 0xee, 0xd4, 0x67, - 0xbf, 0x63, 0x3b, 0x82, 0xa4, 0x1c, 0xfb, 0x93, 0x85, 0x72, 0x4e, 0xf2, 0xe5, 0x22, 0x97, 0x8a, - 0x73, 0x5b, 0x6e, 0x95, 0xc6, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xa8, 0xf6, 0xc1, 0x06, - 0x05, 0x00, 0x00, + 0xaf, 0xc0, 0xc4, 0x2b, 0x74, 0xac, 0xc4, 0xc2, 0x14, 0xa1, 0x84, 0x27, 0xc8, 0x13, 0xa0, 0x5c, + 0x2e, 0xb6, 0x1b, 0x92, 0x54, 0xde, 0x2e, 0xf9, 0xdf, 0xf7, 0xff, 0x7e, 0x7f, 0xdf, 0xa7, 0x0f, + 0xee, 0x38, 0xd4, 0xf5, 0x1b, 0x66, 0xe0, 0xb8, 0x24, 0x3b, 0x9d, 0x1d, 0x38, 0x34, 0xb6, 0x0f, + 0x48, 0x2f, 0xa1, 0xbc, 0x6f, 0x44, 0x9c, 0xc5, 0x0c, 0x6d, 0xa7, 0xb2, 0x91, 0x9d, 0xd4, 0x45, + 0xed, 0xbe, 0xc7, 0x3c, 0x26, 0xef, 0x91, 0xc9, 0x69, 0x5a, 0xa2, 0x3d, 0xf2, 0x18, 0xf3, 0x3a, + 0x94, 0xd8, 0x51, 0x40, 0xec, 0x30, 0x64, 0xb1, 0x1d, 0x07, 0x2c, 0x14, 0x4a, 0xd5, 0x95, 0x2a, + 0x7f, 0x39, 0xc9, 0x29, 0x39, 0x49, 0xb8, 0xbc, 0xa0, 0xf4, 0x95, 0x64, 0x71, 0x3f, 0xa2, 0xca, + 0x08, 0x6f, 0xc3, 0x87, 0x6f, 0x27, 0xa0, 0xc7, 0x3c, 0x7a, 0xe3, 0xb8, 0x16, 0x75, 0x19, 0x3f, + 0x11, 0x16, 0xed, 0x25, 0x54, 0xc4, 0xf8, 0x33, 0x80, 0xda, 0x22, 0x55, 0x44, 0x2c, 0x14, 0x14, + 0xf5, 0xe0, 0x5d, 0x9f, 0x47, 0xed, 0xc0, 0x71, 0xdb, 0x7c, 0x2a, 0x55, 0x41, 0x7d, 0x6d, 0xf7, + 0x8e, 0xb9, 0x67, 0xac, 0xc8, 0x6b, 0xe4, 0xcd, 0x9a, 0xfa, 0xc5, 0xa0, 0x56, 0x1a, 0x0f, 0x6a, + 0x5b, 0x7d, 0xbb, 0xdb, 0x79, 0x85, 0xe7, 0xfc, 0xb0, 0xb5, 0xe1, 0xe7, 0x5b, 0xe3, 0xd7, 0xb0, + 0xfa, 0x1f, 0x90, 0xa2, 0x45, 0x75, 0xb8, 0xe6, 0xf3, 0xa8, 0x0a, 0xea, 0x60, 0xb7, 0xdc, 0xdc, + 0x1c, 0x0f, 0x6a, 0x30, 0xf5, 0xc4, 0xd6, 0x44, 0xc2, 0x9f, 0xc0, 0x82, 0xb4, 0x69, 0x9c, 0x10, + 0x6e, 0x5e, 0x6d, 0x2f, 0xad, 0x0a, 0xa5, 0x79, 0xac, 0xd2, 0x54, 0x16, 0xa5, 0xc1, 0xd6, 0x7a, + 0x3e, 0x0c, 0x7e, 0x00, 0x2b, 0x12, 0xa6, 0x65, 0xc7, 0xc1, 0x19, 0x3d, 0xe6, 0xd1, 0xec, 0xb3, + 0xb7, 0xe0, 0xd6, 0xbc, 0xa0, 0x10, 0x0f, 0x21, 0x0c, 0xe5, 0x9f, 0xed, 0x2c, 0x69, 0x65, 0x3c, + 0xa8, 0xdd, 0x9b, 0xf6, 0xcb, 0x34, 0x6c, 0x95, 0xc3, 0x59, 0xb5, 0xf9, 0xed, 0x26, 0xbc, 0x25, + 0x0d, 0xd1, 0x0f, 0x00, 0x37, 0xae, 0xbc, 0x25, 0x3a, 0x5a, 0x19, 0x6e, 0xe9, 0x68, 0x68, 0x2f, + 0x0a, 0xd7, 0x4d, 0x23, 0x60, 0xf2, 0xf1, 0xd7, 0xdf, 0xaf, 0x37, 0xf6, 0xd0, 0x0e, 0x61, 0xa2, + 0xcb, 0x44, 0x20, 0x48, 0x7c, 0x7e, 0x4a, 0xa9, 0x48, 0xa7, 0x73, 0x6e, 0x04, 0xd0, 0x4f, 0x00, + 0xd7, 0xf3, 0x56, 0xe8, 0x79, 0xb1, 0xd6, 0x33, 0xe2, 0xa3, 0xa2, 0x65, 0x0a, 0xf8, 0xa5, 0x04, + 0x36, 0xd1, 0xb3, 0x55, 0xc0, 0x82, 0x25, 0xdc, 0xa5, 0x6d, 0xd7, 0xb7, 0xc3, 0x90, 0x76, 0xc8, + 0x7b, 0x9f, 0x47, 0x1f, 0xd0, 0x77, 0x00, 0xcb, 0xe9, 0x1b, 0x22, 0xf3, 0xfa, 0xfe, 0xf3, 0x93, + 0xa0, 0x35, 0x0a, 0xd5, 0x28, 0xe0, 0xa7, 0x12, 0xf8, 0x09, 0xc2, 0xcb, 0x80, 0xb3, 0x31, 0x69, + 0xb6, 0x2e, 0x86, 0x3a, 0xb8, 0x1c, 0xea, 0xe0, 0xcf, 0x50, 0x07, 0x5f, 0x46, 0x7a, 0xe9, 0x72, + 0xa4, 0x97, 0x7e, 0x8f, 0xf4, 0xd2, 0xbb, 0x43, 0x2f, 0x88, 0xfd, 0xc4, 0x31, 0x5c, 0xd6, 0x9d, + 0xf9, 0xec, 0x77, 0x6c, 0x47, 0xa8, 0x7d, 0xb2, 0x3f, 0x59, 0x28, 0xe7, 0xb9, 0xe5, 0x22, 0x97, + 0x8a, 0x73, 0x5b, 0x6e, 0x95, 0xc6, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x77, 0xa4, 0x13, + 0x1a, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -482,7 +484,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "bech32ibc/v1beta1/query.proto", + Metadata: "bech32ibc/bech32ibc/v1beta1/query.proto", } func (m *QueryHrpIbcRecordsRequest) Marshal() (dAtA []byte, err error) { @@ -783,10 +785,7 @@ func (m *QueryHrpIbcRecordsRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -870,10 +869,7 @@ func (m *QueryHrpIbcRecordsResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -955,10 +951,7 @@ func (m *QueryHrpIbcRecordRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1041,10 +1034,7 @@ func (m *QueryHrpIbcRecordResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1094,10 +1084,7 @@ func (m *QueryNativeHrpRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1179,10 +1166,7 @@ func (m *QueryNativeHrpResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { diff --git a/x/bech32ibc/types/query.pb.gw.go b/x/bech32ibc/types/query.pb.gw.go index c38994f..fc96b38 100644 --- a/x/bech32ibc/types/query.pb.gw.go +++ b/x/bech32ibc/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: bech32ibc/v1beta1/query.proto +// source: bech32ibc/bech32ibc/v1beta1/query.proto /* Package types is a reverse proxy. @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_HrpIbcRecords_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryHrpIbcRecordsRequest @@ -124,12 +126,14 @@ func local_request_Query_NativeHrp_0(ctx context.Context, marshaler runtime.Mars // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_HrpIbcRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -137,6 +141,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_HrpIbcRecords_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -150,6 +155,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_HrpIbcRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -157,6 +164,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_HrpIbcRecord_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -170,6 +178,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_NativeHrp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -177,6 +187,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_NativeHrp_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -292,11 +303,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_HrpIbcRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "txfees", "v1beta1", "hrp_ibc_records"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_HrpIbcRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "txfees", "v1beta1", "hrp_ibc_records"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_HrpIbcRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "txfees", "v1beta1", "hrp_source_channel", "hrp"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_HrpIbcRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "txfees", "v1beta1", "hrp_source_channel", "hrp"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_NativeHrp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "txfees", "v1beta1", "native_hrp"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_NativeHrp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "txfees", "v1beta1", "native_hrp"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/bech32ibc/types/types.pb.go b/x/bech32ibc/types/types.pb.go index 7e55b4e..b4cdc6a 100644 --- a/x/bech32ibc/types/types.pb.go +++ b/x/bech32ibc/types/types.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bech32ibc/v1beta1/types.proto +// source: bech32ibc/bech32ibc/v1beta1/types.proto package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" io "io" math "math" math_bits "math/bits" @@ -42,7 +42,7 @@ func (m *HrpIbcRecord) Reset() { *m = HrpIbcRecord{} } func (m *HrpIbcRecord) String() string { return proto.CompactTextString(m) } func (*HrpIbcRecord) ProtoMessage() {} func (*HrpIbcRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_95408f5fe13d0f7d, []int{0} + return fileDescriptor_d0ec6092a2253d34, []int{0} } func (m *HrpIbcRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,34 +103,36 @@ func init() { proto.RegisterType((*HrpIbcRecord)(nil), "bech32ibc.bech32ibc.v1beta1.HrpIbcRecord") } -func init() { proto.RegisterFile("bech32ibc/v1beta1/types.proto", fileDescriptor_95408f5fe13d0f7d) } +func init() { + proto.RegisterFile("bech32ibc/bech32ibc/v1beta1/types.proto", fileDescriptor_d0ec6092a2253d34) +} -var fileDescriptor_95408f5fe13d0f7d = []byte{ - // 381 bytes of a gzipped FileDescriptorProto +var fileDescriptor_d0ec6092a2253d34 = []byte{ + // 382 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xc1, 0x8a, 0xda, 0x40, - 0x18, 0xc7, 0x33, 0x2a, 0x85, 0xa6, 0xad, 0xa5, 0xc1, 0x82, 0xda, 0x36, 0x09, 0x39, 0x79, 0xa8, - 0x19, 0xd4, 0x9e, 0x3c, 0x15, 0xdb, 0x82, 0xbd, 0xb4, 0x10, 0x3c, 0xf5, 0x12, 0x32, 0xe3, 0x98, - 0x0c, 0x24, 0x7e, 0x21, 0x33, 0x29, 0xf5, 0x21, 0x0a, 0x3d, 0xf6, 0xd8, 0xd7, 0xe8, 0x1b, 0x78, - 0xf4, 0xb8, 0xa7, 0xec, 0xa2, 0x97, 0x65, 0x8f, 0x3e, 0xc1, 0xe2, 0x8c, 0xae, 0x2c, 0xde, 0xe6, - 0x9b, 0xdf, 0xef, 0x83, 0xef, 0xcf, 0xdf, 0x7c, 0x47, 0x18, 0x4d, 0x46, 0x43, 0x4e, 0x28, 0xfe, - 0x39, 0x20, 0x4c, 0x46, 0x03, 0x2c, 0x57, 0x39, 0x13, 0x7e, 0x5e, 0x80, 0x04, 0xeb, 0xcd, 0x03, - 0xf6, 0xcf, 0xaf, 0xa3, 0xd8, 0x6d, 0xc5, 0x10, 0x83, 0xf2, 0xf0, 0xe1, 0xa5, 0x57, 0xba, 0x76, - 0x0c, 0x10, 0xa7, 0x0c, 0xab, 0x89, 0x94, 0x0b, 0x3c, 0x2f, 0x8b, 0x48, 0x72, 0x58, 0x6a, 0xee, - 0xfd, 0xaf, 0x99, 0xcf, 0xa7, 0x45, 0xfe, 0x95, 0xd0, 0x80, 0x51, 0x28, 0xe6, 0x96, 0x6b, 0xd6, - 0x93, 0x22, 0x6f, 0x23, 0x17, 0xf5, 0x9e, 0x4e, 0x9a, 0xfb, 0xca, 0x31, 0x57, 0x51, 0x96, 0x8e, - 0xbd, 0xa4, 0xc8, 0xbd, 0xe0, 0x80, 0xac, 0x8f, 0x66, 0x53, 0x40, 0x59, 0x50, 0x16, 0xd2, 0x24, - 0x5a, 0x2e, 0x59, 0xda, 0xae, 0x29, 0xb9, 0xb3, 0xaf, 0x9c, 0xd7, 0x5a, 0x7e, 0xcc, 0xbd, 0xe0, - 0x85, 0xfe, 0xf8, 0xa4, 0x67, 0x0b, 0x9b, 0x2d, 0x4e, 0x45, 0x28, 0x21, 0x4c, 0x18, 0x8f, 0x13, - 0x19, 0xc2, 0x62, 0x21, 0x98, 0x6c, 0xd7, 0x5d, 0xd4, 0x6b, 0x04, 0xaf, 0x38, 0x15, 0x33, 0x98, - 0x2a, 0xf2, 0x5d, 0x01, 0xeb, 0x37, 0x32, 0xad, 0xe3, 0x86, 0xe4, 0x19, 0x3b, 0xf9, 0x0d, 0x17, - 0xf5, 0x9e, 0x0d, 0x3b, 0xbe, 0xce, 0xe8, 0x9f, 0x32, 0xfa, 0x9f, 0x8f, 0x19, 0x27, 0x5f, 0xd6, - 0x95, 0x63, 0xdc, 0x55, 0xce, 0xdb, 0xcb, 0xe5, 0xf7, 0x90, 0x71, 0xc9, 0xb2, 0x5c, 0xae, 0xf6, - 0x95, 0xd3, 0xd1, 0x67, 0x5f, 0x5a, 0xde, 0xdf, 0x6b, 0x07, 0x05, 0x2f, 0xd5, 0x45, 0x33, 0x9e, - 0x31, 0x7d, 0xcf, 0xb8, 0x71, 0xfb, 0xcf, 0x41, 0x93, 0x6f, 0xeb, 0xad, 0x8d, 0x36, 0x5b, 0x1b, - 0xdd, 0x6c, 0x6d, 0xf4, 0x67, 0x67, 0x1b, 0x9b, 0x9d, 0x6d, 0x5c, 0xed, 0x6c, 0xe3, 0xc7, 0x87, - 0x98, 0xcb, 0xa4, 0x24, 0x3e, 0x85, 0x0c, 0x83, 0xc8, 0x40, 0x70, 0xd1, 0x4f, 0x23, 0x22, 0xb0, - 0xae, 0xad, 0x7f, 0x28, 0xf8, 0x17, 0x3e, 0x97, 0xad, 0x4a, 0x26, 0x4f, 0x54, 0x80, 0xd1, 0x7d, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x66, 0xa9, 0x9d, 0x06, 0x02, 0x00, 0x00, + 0x18, 0xc7, 0x33, 0x2a, 0x85, 0xa6, 0xad, 0xa5, 0xc1, 0x82, 0xda, 0x92, 0x84, 0x5c, 0xea, 0xa1, + 0x26, 0xa8, 0x3d, 0x79, 0x2a, 0xb6, 0x05, 0x7b, 0x69, 0x21, 0x78, 0xea, 0x25, 0x64, 0xc6, 0x31, + 0x19, 0x48, 0xfc, 0x42, 0x66, 0x52, 0xea, 0x43, 0x14, 0x7a, 0xec, 0x71, 0x5f, 0x63, 0xdf, 0xc0, + 0xa3, 0xc7, 0x3d, 0x65, 0x17, 0xbd, 0x2c, 0x7b, 0xf4, 0x09, 0x16, 0x67, 0xe2, 0xba, 0x8b, 0xb7, + 0x6f, 0xe6, 0xf7, 0xfb, 0xe0, 0xfb, 0xf3, 0xd7, 0x3f, 0x60, 0x4a, 0xe2, 0xd1, 0x90, 0x61, 0xe2, + 0x9d, 0xa6, 0xdf, 0x03, 0x4c, 0x45, 0x38, 0xf0, 0xc4, 0x2a, 0xa3, 0xdc, 0xcd, 0x72, 0x10, 0x60, + 0xbc, 0x7b, 0xc0, 0xee, 0x69, 0xaa, 0xc4, 0x6e, 0x2b, 0x82, 0x08, 0xa4, 0xe7, 0x1d, 0x26, 0xb5, + 0xd2, 0x35, 0x23, 0x80, 0x28, 0xa1, 0x9e, 0x7c, 0xe1, 0x62, 0xe1, 0xcd, 0x8b, 0x3c, 0x14, 0x0c, + 0x96, 0x8a, 0x3b, 0x97, 0x35, 0xfd, 0xe5, 0x34, 0xcf, 0xbe, 0x63, 0xe2, 0x53, 0x02, 0xf9, 0xdc, + 0xb0, 0xf5, 0x7a, 0x9c, 0x67, 0x6d, 0x64, 0xa3, 0xde, 0xf3, 0x49, 0x73, 0x5f, 0x5a, 0xfa, 0x2a, + 0x4c, 0x93, 0xb1, 0x13, 0xe7, 0x99, 0xe3, 0x1f, 0x90, 0xf1, 0x59, 0x6f, 0x72, 0x28, 0x72, 0x42, + 0x03, 0x12, 0x87, 0xcb, 0x25, 0x4d, 0xda, 0x35, 0x29, 0x77, 0xf6, 0xa5, 0xf5, 0x56, 0xc9, 0x4f, + 0xb9, 0xe3, 0xbf, 0x52, 0x1f, 0x5f, 0xd4, 0xdb, 0xf0, 0xf4, 0x16, 0x23, 0x3c, 0x10, 0x10, 0xc4, + 0x94, 0x45, 0xb1, 0x08, 0x60, 0xb1, 0xe0, 0x54, 0xb4, 0xeb, 0x36, 0xea, 0x35, 0xfc, 0x37, 0x8c, + 0xf0, 0x19, 0x4c, 0x25, 0xf9, 0x29, 0x81, 0xf1, 0x17, 0xe9, 0x46, 0xb5, 0x21, 0x58, 0x4a, 0x8f, + 0x7e, 0xc3, 0x46, 0xbd, 0x17, 0xc3, 0x8e, 0xab, 0x32, 0xba, 0xc7, 0x8c, 0xee, 0xd7, 0x2a, 0xe3, + 0xe4, 0xdb, 0xba, 0xb4, 0xb4, 0xbb, 0xd2, 0x7a, 0x7f, 0xbe, 0xfc, 0x11, 0x52, 0x26, 0x68, 0x9a, + 0x89, 0xd5, 0xbe, 0xb4, 0x3a, 0xea, 0xec, 0x73, 0xcb, 0xf9, 0x7f, 0x6d, 0x21, 0xff, 0xb5, 0xbc, + 0x68, 0xc6, 0x52, 0xaa, 0xee, 0x19, 0x37, 0x6e, 0x2f, 0x2c, 0x34, 0xf9, 0xb1, 0xde, 0x9a, 0x68, + 0xb3, 0x35, 0xd1, 0xcd, 0xd6, 0x44, 0xff, 0x76, 0xa6, 0xb6, 0xd9, 0x99, 0xda, 0xd5, 0xce, 0xd4, + 0x7e, 0x7d, 0x8a, 0x98, 0x88, 0x0b, 0xec, 0x12, 0x48, 0x3d, 0xe0, 0x29, 0x70, 0xc6, 0xfb, 0x49, + 0x88, 0x79, 0xd5, 0x6f, 0xff, 0x50, 0xf0, 0x9f, 0x47, 0x65, 0xcb, 0x92, 0xf1, 0x33, 0x19, 0x60, + 0x74, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x53, 0x3a, 0x89, 0x19, 0x10, 0x02, 0x00, 0x00, } func (this *HrpIbcRecord) Equal(that interface{}) bool { @@ -186,7 +188,7 @@ func (m *HrpIbcRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.IcsToTimeOffset, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.IcsToTimeOffset):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.IcsToTimeOffset, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.IcsToTimeOffset):]) if err1 != nil { return 0, err1 } @@ -244,7 +246,7 @@ func (m *HrpIbcRecord) Size() (n int) { if m.IcsToHeightOffset != 0 { n += 1 + sovTypes(uint64(m.IcsToHeightOffset)) } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.IcsToTimeOffset) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.IcsToTimeOffset) n += 1 + l + sovTypes(uint64(l)) return n } @@ -396,7 +398,7 @@ func (m *HrpIbcRecord) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.IcsToTimeOffset, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.IcsToTimeOffset, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -406,10 +408,7 @@ func (m *HrpIbcRecord) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { diff --git a/x/bech32ics20/keeper/keeper.go b/x/bech32ics20/keeper/keeper.go index 3925d46..94c588b 100644 --- a/x/bech32ics20/keeper/keeper.go +++ b/x/bech32ics20/keeper/keeper.go @@ -3,12 +3,12 @@ package keeper import ( "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/tendermint/tendermint/libs/log" "github.com/osmosis-labs/bech32-ibc/x/bech32ics20/types" ) diff --git a/x/bech32ics20/keeper/msg_server.go b/x/bech32ics20/keeper/msg_server.go index 307938d..4a0c2f2 100644 --- a/x/bech32ics20/keeper/msg_server.go +++ b/x/bech32ics20/keeper/msg_server.go @@ -8,8 +8,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" ) type msgServer struct { @@ -86,6 +86,7 @@ func (k msgServer) Send(goCtx context.Context, msg *banktypes.MsgSend) (*banktyp return &banktypes.MsgSendResponse{}, err } + func (k msgServer) MultiSend(goCtx context.Context, msg *banktypes.MsgMultiSend) (*banktypes.MsgMultiSendResponse, error) { bankMsgServer := bankkeeper.NewMsgServerImpl(k.Keeper.Keeper) return bankMsgServer.MultiSend(goCtx, msg) diff --git a/x/bech32ics20/module.go b/x/bech32ics20/module.go index ec0384c..3292bfc 100644 --- a/x/bech32ics20/module.go +++ b/x/bech32ics20/module.go @@ -2,10 +2,9 @@ package bech32ics20 import ( "encoding/json" - "math/rand" "time" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/telemetry" @@ -64,19 +63,9 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { bankkeeper.RegisterInvariants(ir, am.keeper.Keeper) } -// Route returns the message routing key for the bank module. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the bank module's querier route name. func (AppModule) QuerierRoute() string { return types.RouterKey } -// LegacyQuerierHandler returns the bank module sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return bankkeeper.NewQuerier(am.keeper, legacyQuerierCdc) -} - // InitGenesis performs genesis initialization for the bech32ics20 module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -122,11 +111,6 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP return nil } -// RandomizedParams creates randomized bank param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { - return simulation.ParamChanges(r) -} - // RegisterStoreDecoder registers a decoder for supply module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {} diff --git a/x/bech32ics20/types/expected_keepers.go b/x/bech32ics20/types/expected_keepers.go index 71fad3c..e249b73 100644 --- a/x/bech32ics20/types/expected_keepers.go +++ b/x/bech32ics20/types/expected_keepers.go @@ -4,9 +4,9 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v6/modules/core/exported" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" )